Skip to content

Commit 3b06d9d

Browse files
authored
Add retry around common timeout for hardened docker test (#12601)
Signed-off-by: Derek Nola <derek.nola@suse.com>
1 parent 66102c5 commit 3b06d9d

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

tests/docker/hardened/hardened_test.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,20 @@ kubelet-arg:
8585
return docker.RunCommand(cmd)
8686
}, "60s", "5s").Should(Equal("2"))
8787
_, err = config.DeployWorkload("hardened-netpool.yaml")
88+
Expect(err).NotTo(HaveOccurred())
8889
})
8990
It("checks ingress connections", func() {
9091
for _, scheme := range []string{"http", "https"} {
91-
for _, server := range config.Servers {
92-
cmd := fmt.Sprintf("curl -vksf -H 'Host: example.com' %s://%s/", scheme, server.IP)
93-
Expect(docker.RunCommand(cmd)).Error().NotTo(HaveOccurred())
94-
}
95-
for _, agent := range config.Agents {
96-
cmd := fmt.Sprintf("curl -vksf -H 'Host: example.com' %s://%s/", scheme, agent.IP)
97-
Expect(docker.RunCommand(cmd)).Error().NotTo(HaveOccurred())
98-
}
92+
Eventually(func(g Gomega) {
93+
for _, server := range config.Servers {
94+
cmd := fmt.Sprintf("curl -vksf -H 'Host: example.com' %s://%s/", scheme, server.IP)
95+
g.Expect(docker.RunCommand(cmd)).Error().NotTo(HaveOccurred())
96+
}
97+
for _, agent := range config.Agents {
98+
cmd := fmt.Sprintf("curl -vksf -H 'Host: example.com' %s://%s/", scheme, agent.IP)
99+
g.Expect(docker.RunCommand(cmd)).Error().NotTo(HaveOccurred())
100+
}
101+
}, "30s", "10s").Should(Succeed())
99102
}
100103
})
101104
It("confirms we can make a request through the nodeport service", func() {

0 commit comments

Comments
 (0)