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() {
8585 log .info ("Cleaned up namespace " + TEST_NAMESPACE );
8686 }
8787
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+ */
8897 public void teardownIfSuccess (TestRun test ) throws Exception {
8998 try {
9099 test .run ();
You can’t perform that action at this time.
0 commit comments