integration-tests/src/test/java/oracle/kubernetes/operator/ItUsabilityOperatorHelmChart.java
@Test
  public void testNotPreCreatedOpNsCreateOperatorNegativeInstall() throws Exception {
    Assumptions.assumeTrue(FULLTEST);
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);
    Operator operator = null;
    boolean gotException = true;

    operator =
        new Operator(
            (createOperatorMap(getNewSuffixCount(), false, "usab")),
            true,
            false,
            true,
            RestCertType.SELF_SIGNED);
    String command = " kubectl delete namespace " + operator.getOperatorNamespace();
    TestUtils.execOrAbortProcess(command);
    try {
      operator.callHelmInstall();
      gotException = false;
    } catch (Exception ex) {
      LoggerHelper.getLocal().log(Level.INFO, "Helm install operator with non existing namespace failed as expected");
    }
    Assertions.assertTrue(gotException, "Helm install operator with non existing namespace should fail");
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - " + testMethodName);
  }
/**
   * Install the operator with non existing operator namespace.
   * The helm install command should fail.
   * 
   * @throws Exception when helm install does not fail
   */
Install the operator with non existing operator namespace.
The helm install command should fail.

@throws Exception when helm install does not fail
Install the operator with non existing operator namespace . The helm install command should fail . @throws Exception when helm install does not fail
@Test
  public void testNotPreCreatedOpNsCreateOperatorNegativeInstall() throws Exception {
    Assumptions.assumeTrue(FULLTEST);
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);
    Operator operator = null;
    boolean gotException = true;
    operator =
        new Operator(
            (createOperatorMap(getNewSuffixCount(), false, "usab")),
            true,
            false,
            true,
            RestCertType.SELF_SIGNED);
    String command = " kubectl delete namespace " + operator.getOperatorNamespace();
    TestUtils.execOrAbortProcess(command);
    try {
      operator.callHelmInstall();
      gotException = false;
    } catch (Exception ex) {
      LoggerHelper.getLocal().log(Level.INFO, "Helm install operator with non existing namespace failed as expected");
    }
    Assertions.assertTrue(gotException, "Helm install operator with non existing namespace should fail");
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - " + testMethodName);
  }
@ Test public void testNotPreCreatedOpNsCreateOperatorNegativeInstall ( ) throws Exception { Assumptions . assumeTrue ( FULLTEST ) ; String testMethodName = new Object ( ) { } . getClass ( ) . getEnclosingMethod ( ) . getName ( ) ; logTestBegin ( testMethodName ) ; Operator operator = null ; boolean gotException = true ; operator = new Operator ( ( createOperatorMap ( getNewSuffixCount ( ) , false , "usab" ) ) , true , false , true , RestCertType . SELF_SIGNED ) ; String command = " kubectl delete namespace " + operator . getOperatorNamespace ( ) ; TestUtils . execOrAbortProcess ( command ) ; try { operator . callHelmInstall ( ) ; gotException = false ; } catch ( Exception ex ) { LoggerHelper . getLocal ( ) . log ( Level . INFO , "Helm install operator with non existing namespace failed as expected" ) ; } Assertions . assertTrue ( gotException , "Helm install operator with non existing namespace should fail" ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "SUCCESS - " + testMethodName ) ; }
Install the operator with non existing operator namespace.
Install the operator with non existing operator namespace .