integration-tests/src/test/java/oracle/kubernetes/operator/ItUsabilityOperatorHelmChart.java
@Test
  public void testCreateChartWithInvalidAttributesNegativeInstall() throws Exception {
    Assumptions.assumeTrue(QUICKTEST);
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);
    Operator operator = null;
    Map<String, Object> operatorMap = createOperatorMap(getNewSuffixCount(), true, "usab");

    try {
      operatorMap.put("elkIntegrationEnabled", "true");
      operator = new Operator(operatorMap, RestCertType.SELF_SIGNED);
      operator.callHelmInstall();
      throw new Exception(
          "FAILURE: Helm installs the operator with an invalid value for attribute elkIntegrationEnabled ");

    } catch (Exception ex) {
      if (!ex.getMessage().contains("elkIntegrationEnabled must be a bool : string")) {
        throw new Exception(
            "FAILURE: Helm installs the operator with an invalid value for an attribute "
                + "elkIntegrationEnabled does not report expected message "
                + ex.getMessage());
      }
    }
    namespaceList.append(" ").append(operatorMap.get("namespace"));
    try {
      operatorMap = createOperatorMap(getNewSuffixCount(), true, "usab");
      operatorMap.put("javaLoggingLevel", "VERBOSE");
      operator = new Operator(operatorMap, true, true, false, RestCertType.SELF_SIGNED);
      operator.callHelmInstall();
      throw new Exception(
          "FAILURE: Helm installs the operator with an invalid value for an attribute javaLoggingLevel ");

    } catch (Exception ex) {
      if (!ex.getMessage()
          .contains(
              "javaLoggingLevel must be one of the following values [SEVERE WARNING "
                  + "INFO CONFIG FINE FINER FINEST] : VERBOSE")) {
        throw new Exception(
            "FAILURE: Helm installs the operator with an invalid value for an attribute "
                + "externalRestEnabled does not report expected message "
                + ex.getMessage());
      }
    } 
    namespaceList.append(" ").append(operatorMap.get("namespace"));
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - " + testMethodName);
  }
/**
   * Initialize the operator with elkIntegrationEnabled attribute set to "true".
   * Install the operator.
   * Installation should fail as elkIntegrationEnabled is supposed to be boolean.
   * Initialize the operator with javaLoggingLevel attribute set to "VERBOSE".
   * Install the operator.
   * Installation should fail as VERBOSE is not a valid value for javaLoggingLevel 
   * @throws Exception when operator installation does not fail
   */
Initialize the operator with elkIntegrationEnabled attribute set to "true".
Install the operator.
Installation should fail as elkIntegrationEnabled is supposed to be boolean.
Initialize the operator with javaLoggingLevel attribute set to "VERBOSE".
Install the operator.
Installation should fail as VERBOSE is not a valid value for javaLoggingLevel
@throws Exception when operator installation does not fail
Initialize the operator with elkIntegrationEnabled attribute set to " true " . Install the operator . Installation should fail as elkIntegrationEnabled is supposed to be boolean . Initialize the operator with javaLoggingLevel attribute set to " VERBOSE " . Install the operator . Installation should fail as VERBOSE is not a valid value for javaLoggingLevel @throws Exception when operator installation does not fail
@Test
  public void testCreateChartWithInvalidAttributesNegativeInstall() throws Exception {
    Assumptions.assumeTrue(QUICKTEST);
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);
    Operator operator = null;
    Map<String, Object> operatorMap = createOperatorMap(getNewSuffixCount(), true, "usab");
    try {
      operatorMap.put("elkIntegrationEnabled", "true");
      operator = new Operator(operatorMap, RestCertType.SELF_SIGNED);
      operator.callHelmInstall();
      throw new Exception(
          "FAILURE: Helm installs the operator with an invalid value for attribute elkIntegrationEnabled ");
    } catch (Exception ex) {
      if (!ex.getMessage().contains("elkIntegrationEnabled must be a bool : string")) {
        throw new Exception(
            "FAILURE: Helm installs the operator with an invalid value for an attribute "
                + "elkIntegrationEnabled does not report expected message "
                + ex.getMessage());
      }
    }
    namespaceList.append(" ").append(operatorMap.get("namespace"));
    try {
      operatorMap = createOperatorMap(getNewSuffixCount(), true, "usab");
      operatorMap.put("javaLoggingLevel", "VERBOSE");
      operator = new Operator(operatorMap, true, true, false, RestCertType.SELF_SIGNED);
      operator.callHelmInstall();
      throw new Exception(
          "FAILURE: Helm installs the operator with an invalid value for an attribute javaLoggingLevel ");
    } catch (Exception ex) {
      if (!ex.getMessage()
          .contains(
              "javaLoggingLevel must be one of the following values [SEVERE WARNING "
                  + "INFO CONFIG FINE FINER FINEST] : VERBOSE")) {
        throw new Exception(
            "FAILURE: Helm installs the operator with an invalid value for an attribute "
                + "externalRestEnabled does not report expected message "
                + ex.getMessage());
      }
    } 
    namespaceList.append(" ").append(operatorMap.get("namespace"));
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - " + testMethodName);
  }
@ Test public void testCreateChartWithInvalidAttributesNegativeInstall ( ) throws Exception { Assumptions . assumeTrue ( QUICKTEST ) ; String testMethodName = new Object ( ) { } . getClass ( ) . getEnclosingMethod ( ) . getName ( ) ; logTestBegin ( testMethodName ) ; Operator operator = null ; Map < String , Object > operatorMap = createOperatorMap ( getNewSuffixCount ( ) , true , "usab" ) ; try { operatorMap . put ( "elkIntegrationEnabled" , "true" ) ; operator = new Operator ( operatorMap , RestCertType . SELF_SIGNED ) ; operator . callHelmInstall ( ) ; throw new Exception ( "FAILURE: Helm installs the operator with an invalid value for attribute elkIntegrationEnabled " ) ; } catch ( Exception ex ) { if ( ! ex . getMessage ( ) . contains ( "elkIntegrationEnabled must be a bool : string" ) ) { throw new Exception ( "FAILURE: Helm installs the operator with an invalid value for an attribute " + "elkIntegrationEnabled does not report expected message " + ex . getMessage ( ) ) ; } } namespaceList . append ( " " ) . append ( operatorMap . get ( "namespace" ) ) ; try { operatorMap = createOperatorMap ( getNewSuffixCount ( ) , true , "usab" ) ; operatorMap . put ( "javaLoggingLevel" , "VERBOSE" ) ; operator = new Operator ( operatorMap , true , true , false , RestCertType . SELF_SIGNED ) ; operator . callHelmInstall ( ) ; throw new Exception ( "FAILURE: Helm installs the operator with an invalid value for an attribute javaLoggingLevel " ) ; } catch ( Exception ex ) { if ( ! ex . getMessage ( ) . contains ( "javaLoggingLevel must be one of the following values [SEVERE WARNING " + "INFO CONFIG FINE FINER FINEST] : VERBOSE" ) ) { throw new Exception ( "FAILURE: Helm installs the operator with an invalid value for an attribute " + "externalRestEnabled does not report expected message " + ex . getMessage ( ) ) ; } } namespaceList . append ( " " ) . append ( operatorMap . get ( "namespace" ) ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "SUCCESS - " + testMethodName ) ; }
Initialize the operator with elkIntegrationEnabled attribute set to "true".
Initialize the operator with elkIntegrationEnabled attribute set to " true " .