From 6150edd3557aa0bf03950063d8fbf13499a3d96a Mon Sep 17 00:00:00 2001 From: Kyle Squizzato Date: Thu, 26 Sep 2024 09:59:57 -0700 Subject: [PATCH] Do not rely on CurrentSpecReport.Failed in AfterSuite Signed-off-by: Kyle Squizzato --- test/e2e/e2e_suite_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index 96f94cc52..433c1c2b9 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -72,11 +72,9 @@ var _ = BeforeSuite(func() { var _ = AfterSuite(func() { if !noCleanup() { - if CurrentSpecReport().Failed() { - By("collecting failure logs from local controllers") - kc := kubeclient.NewFromLocal(internalutils.DefaultSystemNamespace) - collectLogArtifacts(kc, "") - } + By("collecting logs from local controllers") + kc := kubeclient.NewFromLocal(internalutils.DefaultSystemNamespace) + collectLogArtifacts(kc, "") By("removing the controller-manager") cmd := exec.Command("make", "dev-destroy")