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 d8637ff8df)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
Brad Davidson 2026-04-22 17:31:33 +00:00
parent 9b61bc4b0f
commit 330546c548
No known key found for this signature in database
GPG key ID: FFB7A9376A9349B9

View file

@ -50,6 +50,12 @@ var _ = DescribeTableSubtree("DualStack Tests", Ordered, func(ipConfig string) {
})
Context("Validate dualstack components", func() {
It("Checks Node Status", func() {
Eventually(func() error {
return tests.NodesReady(tc.KubeconfigFile, tc.GetNodeNames())
}, "620s", "5s").Should(Succeed())
})
It("Verifies that each node has IPv4 and IPv6", func() {
for _, node := range append(tc.Servers, tc.Agents...) {
ips, err := tests.GetNodeIPs(node.Name, tc.KubeconfigFile)
@ -57,6 +63,13 @@ var _ = DescribeTableSubtree("DualStack Tests", Ordered, func(ipConfig string) {
Expect(ips).To(ContainElements(ContainSubstring("172.18.0"), ContainSubstring("fd11:decf:c0ff")))
}
})
It("Checks pod status", func() {
Eventually(func() error {
return tests.AllPodsUp(tc.KubeconfigFile, "kube-system")
}, "620s", "5s").Should(Succeed())
})
It("Verifies that each pod has IPv4 and IPv6", func() {
pods, err := tests.ParsePods(tc.KubeconfigFile, "kube-system")
Expect(err).NotTo(HaveOccurred())