new-integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMonitoringExporter.java
private void changeConfigNoCredentials() throws Exception {
    WebClient webClient = new WebClient();
    String expectedErrorMsg = "401 Unauthorized for " + exporterUrl;
    try {
      HtmlPage page =
              submitConfigureForm(
                      exporterUrl, "append", RESOURCE_DIR + "/exporter/rest_snakecasetrue.yaml", webClient);
      throw new RuntimeException("Form was submitted successfully with no credentials");
    } catch (FailingHttpStatusCodeException ex) {
      assertTrue((ex.getMessage()).contains(expectedErrorMsg));
    }
  }
// verify that change configuration fails without authentication
verify that change configuration fails without authentication
verify that change configuration fails without authentication
private void changeConfigNoCredentials() throws Exception {
    WebClient webClient = new WebClient();
    String expectedErrorMsg = "401 Unauthorized for " + exporterUrl;
    try {
      HtmlPage page =
              submitConfigureForm(
                      exporterUrl, "append", RESOURCE_DIR + "/exporter/rest_snakecasetrue.yaml", webClient);
      throw new RuntimeException("Form was submitted successfully with no credentials");
    } catch (FailingHttpStatusCodeException ex) {
      assertTrue((ex.getMessage()).contains(expectedErrorMsg));
    }
  }
private void changeConfigNoCredentials ( ) throws Exception { WebClient webClient = new WebClient ( ) ; String expectedErrorMsg = "401 Unauthorized for " + exporterUrl ; try { HtmlPage page = submitConfigureForm ( exporterUrl , "append" , RESOURCE_DIR + "/exporter/rest_snakecasetrue.yaml" , webClient ) ; throw new RuntimeException ( "Form was submitted successfully with no credentials" ) ; } catch ( FailingHttpStatusCodeException ex ) { assertTrue ( ( ex . getMessage ( ) ) . contains ( expectedErrorMsg ) ) ; } }
verify that change configuration fails without authentication
verify that change configuration fails without authentication