Skip to content

Commit 35e4874

Browse files
committed
Fix docker dualstack test
Wait for nodes and pods to be ready before checking IPs Signed-off-by: Brad Davidson <brad.davidson@rancher.com> (cherry picked from commit d8637ff) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
1 parent 7ca3027 commit 35e4874

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/docker/dualstack/dualstack_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,26 @@ var _ = DescribeTableSubtree("DualStack Tests", Ordered, func(ipConfig string) {
5050
})
5151

5252
Context("Validate dualstack components", func() {
53+
It("Checks Node Status", func() {
54+
Eventually(func() error {
55+
return tests.NodesReady(tc.KubeconfigFile, tc.GetNodeNames())
56+
}, "620s", "5s").Should(Succeed())
57+
})
58+
5359
It("Verifies that each node has IPv4 and IPv6", func() {
5460
for _, node := range append(tc.Servers, tc.Agents...) {
5561
ips, err := tests.GetNodeIPs(node.Name, tc.KubeconfigFile)
5662
Expect(err).NotTo(HaveOccurred(), "failed to get node IPs for "+node.Name)
5763
Expect(ips).To(ContainElements(ContainSubstring("172.18.0"), ContainSubstring("fd11:decf:c0ff")))
5864
}
5965
})
66+
67+
It("Checks pod status", func() {
68+
Eventually(func() error {
69+
return tests.AllPodsUp(tc.KubeconfigFile, "kube-system")
70+
}, "620s", "5s").Should(Succeed())
71+
})
72+
6073
It("Verifies that each pod has IPv4 and IPv6", func() {
6174
pods, err := tests.ParsePods(tc.KubeconfigFile, "kube-system")
6275
Expect(err).NotTo(HaveOccurred())

0 commit comments

Comments
 (0)