Skip to content

Commit

Permalink
Do not rely on CurrentSpecReport.Failed in AfterSuite
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Squizzato <[email protected]>
  • Loading branch information
squizzi committed Sep 26, 2024
1 parent b5e0279 commit 6150edd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 6150edd

Please sign in to comment.