File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
operator-framework/src/test/java/com/github/containersolutions/operator Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,15 @@ public void cleanup() {
85
85
log .info ("Cleaned up namespace " + TEST_NAMESPACE );
86
86
}
87
87
88
+ /**
89
+ * Use this method to execute the cleanup of the integration test namespace only in case the test
90
+ * was successful. This is useful to keep the Kubernetes resources around to debug a failed test run.
91
+ * Unfortunately I couldn't make this work with standard JUnit methods as the @AfterAll method doesn't know
92
+ * if the tests succeeded or not.
93
+ *
94
+ * @param test The code of the actual test.
95
+ * @throws Exception if the test threw an exception.
96
+ */
88
97
public void teardownIfSuccess (TestRun test ) throws Exception {
89
98
try {
90
99
test .run ();
You can’t perform that action at this time.
0 commit comments