Skip to content

Commit ff1b8c2

Browse files
committed
Don't delete the namespace if the test fails
1 parent f4e24d9 commit ff1b8c2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: test/e2e/e2e_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ var _ = BeforeSuite(func() {
9999
ObjectMeta: metav1.ObjectMeta{
100100
Name: testNamespace,
101101
Annotations: map[string]string{
102-
"olm.e2e": "testNamespace",
102+
"olm.e2e": "no-e2e-kube-client-reset",
103103
},
104104
},
105105
})

Diff for: test/e2e/util/e2e_client.go

+5
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ func (m *E2EKubeClient) Reset() error {
5959
break
6060
}
6161

62+
// Don't delete e2e resources we don't testNamespace.
63+
if obj.GetAnnotations()["olm.e2e"] == "no-e2e-kube-client-reset" {
64+
continue
65+
}
66+
6267
namespace := obj.GetNamespace()
6368
if namespace == "" {
6469
namespace = "<global>"

0 commit comments

Comments
 (0)