Skip to content

Commit 5865836

Browse files
committed
fixed the tests2
1 parent 96661be commit 5865836

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/ItUsabilityOperatorHelmChart.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -191,27 +191,20 @@ public void testNotPreCreatedOpNsCreateOperatorNegativeInstall() throws Exceptio
191191
operator =
192192
new Operator(
193193
(TestUtils.createOperatorMap(number, false)),
194-
false,
194+
true,
195195
false,
196196
true,
197197
RestCertType.SELF_SIGNED);
198+
String command = " kubectl delete namespace weblogic-operator" + number;
199+
TestUtils.exec(command);
198200
try {
199201
operator.callHelmInstall();
200202
throw new RuntimeException("FAILURE: Helm install operator with not preexisted namespace ");
201203

202204
} catch (Exception ex) {
203-
String cmdLb = "helm list --failed " + " | grep " + oprelease;
204-
logger.info("Executing cmd " + cmdLb);
205-
ExecResult result = ExecCommand.exec(cmdLb);
206-
if (result.exitValue() != 0) {
207-
throw new RuntimeException(
208-
"FAILURE: Helm installs operator with not preexisted namespace ");
209-
}
205+
logger.info("Helm install operator with not preexisted ns failed as expected");
210206
} finally {
211207
number++;
212-
if (operator != null) {
213-
operator.destroy();
214-
}
215208
}
216209
logger.info("SUCCESS - " + testMethodName);
217210
}

0 commit comments

Comments
 (0)