Skip to content

Commit

Permalink
Don't delete the namespace if the test fails
Browse files Browse the repository at this point in the history
  • Loading branch information
awgreene committed Sep 21, 2023
1 parent f4e24d9 commit ff1b8c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ var _ = BeforeSuite(func() {
ObjectMeta: metav1.ObjectMeta{
Name: testNamespace,
Annotations: map[string]string{
"olm.e2e": "testNamespace",
"olm.e2e": "no-e2e-kube-client-reset",
},
},
})
Expand Down
5 changes: 5 additions & 0 deletions test/e2e/util/e2e_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ func (m *E2EKubeClient) Reset() error {
break
}

// Don't delete e2e resources we don't testNamespace.
if obj.GetAnnotations()["olm.e2e"] == "no-e2e-kube-client-reset" {
continue
}

namespace := obj.GetNamespace()
if namespace == "" {
namespace = "<global>"
Expand Down

0 comments on commit ff1b8c2

Please sign in to comment.