From f710d4900ce927f44cf145c2f6fb7c192f3373b6 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Thu, 20 Feb 2025 22:28:59 +0000 Subject: [PATCH] e2e: wait for deployments before getting logs Signed-off-by: Brad Davidson --- tests/e2e/startup/startup_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/e2e/startup/startup_test.go b/tests/e2e/startup/startup_test.go index cc1397edcffe..0a7a36f7b8a3 100644 --- a/tests/e2e/startup/startup_test.go +++ b/tests/e2e/startup/startup_test.go @@ -127,6 +127,9 @@ var _ = Describe("Various Startup Configurations", Ordered, func() { Eventually(func() error { return tests.AllPodsUp(tc.KubeconfigFile) }, "360s", "5s").Should(Succeed()) + Eventually(func() error { + return tests.CheckDeployments([]string{"coredns", "local-path-provisioner", "metrics-server"}, tc.KubeconfigFile) + }, "300s", "10s").Should(Succeed()) e2e.DumpPods(tc.KubeconfigFile) }) @@ -193,6 +196,9 @@ var _ = Describe("Various Startup Configurations", Ordered, func() { Eventually(func() error { return tests.AllPodsUp(tc.KubeconfigFile) }, "360s", "5s").Should(Succeed()) + Eventually(func() error { + return tests.CheckDefaultDeployments(tc.KubeconfigFile) + }, "300s", "10s").Should(Succeed()) e2e.DumpPods(tc.KubeconfigFile) }) @@ -234,6 +240,9 @@ var _ = Describe("Various Startup Configurations", Ordered, func() { Eventually(func() error { return tests.AllPodsUp(tc.KubeconfigFile) }, "360s", "5s").Should(Succeed()) + Eventually(func() error { + return tests.CheckDefaultDeployments(tc.KubeconfigFile) + }, "300s", "10s").Should(Succeed()) e2e.DumpPods(tc.KubeconfigFile) }) It("Kills the cluster", func() { @@ -267,6 +276,9 @@ var _ = Describe("Various Startup Configurations", Ordered, func() { Eventually(func() error { return tests.AllPodsUp(tc.KubeconfigFile) }, "360s", "5s").Should(Succeed()) + Eventually(func() error { + return tests.CheckDefaultDeployments(tc.KubeconfigFile) + }, "300s", "10s").Should(Succeed()) e2e.DumpPods(tc.KubeconfigFile) }) It("Kills the cluster", func() { @@ -301,6 +313,9 @@ var _ = Describe("Various Startup Configurations", Ordered, func() { return tests.AllPodsUp(tc.KubeconfigFile) }, "360s", "5s").Should(Succeed()) e2e.DumpPods(tc.KubeconfigFile) + Eventually(func() error { + return tests.CheckDefaultDeployments(tc.KubeconfigFile) + }, "300s", "10s").Should(Succeed()) }) It("Returns pod metrics", func() {