Skip to content

Commit

Permalink
test: Retrieve the private interface in an Eventually
Browse files Browse the repository at this point in the history
Upon sysdump inspection of
#16479, it's possible that the
failures in retrieving the private interface are time-sensative. As
#16479 (comment)
points out, the output of `ip a` actually showed that the interface the
test was looking for existed, so it's very likely a timing issue. This
commit attempts to fix this flake by retrying until we are able to
extract out the interface.

Signed-off-by: Chris Tarazi <chris@isovalent.com>
  • Loading branch information
christarazi committed Jul 23, 2021
1 parent 059c4f5 commit 47dad6f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/k8sT/DatapathConfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,10 +699,17 @@ var _ = Describe("K8sDatapathConfig", func() {
SkipContextIf(func() bool {
return helpers.RunsOnGKE() || helpers.RunsWithoutKubeProxy()
}, "Transparent encryption DirectRouting", func() {
It("Check connectivity with transparent encryption and direct routing", func() {
privateIface, err := kubectl.GetPrivateIface()
Expect(err).Should(BeNil(), "Unable to determine private iface")
var privateIface string
BeforeAll(func() {
Eventually(func() (string, error) {
iface, err := kubectl.GetPrivateIface()
privateIface = iface
return iface, err
}, helpers.MidCommandTimeout, time.Second).ShouldNot(BeEmpty(),
"Unable to determine private iface")
})

It("Check connectivity with transparent encryption and direct routing", func() {
deploymentManager.Deploy(helpers.CiliumNamespace, IPSecSecret)
deploymentManager.DeployCilium(map[string]string{
"tunnel": "disabled",
Expand Down

0 comments on commit 47dad6f

Please sign in to comment.