integration-tests/src/test/java/oracle/kubernetes/operator/ItMonitoringExporter.java
@Test
  @Order(1)
  public void testEndToEndViaChart() throws Exception {
    Assumptions.assumeTrue(FULLTEST);
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);
    try {
      configureDomainInPrometheus(domainNS1, domainNS1, domainNS2, domainNS2);
      createWlsImageAndDeploy();
      checkPromGrafana("wls_servlet_execution_time_average", "test-webapp");
      fireAlert();
      addMonitoringToExistedDomain();
    } catch (Exception ex) {
      //switch Perforce to use domain in pv
      configureDomainInPrometheus(domainNS2, domainNS2, domainNS1, domainNS1);
      throw ex;
    } finally {
      String crdCmd =
          " kubectl delete -f " + monitoringExporterEndToEndDir + "/demo-domains/domainInImage.yaml";
      ExecCommand.exec(crdCmd);
      crdCmd = "kubectl delete secret " + domainNS2 + "-weblogic-credentials";
      ExecCommand.exec(crdCmd);
      TestUtils.deleteWeblogicDomainResources(domainNS2);
    }
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - " + testMethodName);

  }
/**
   * Test End to End example from MonitoringExporter github project.
   *
   * @throws Exception if test fails to execute all of the steps or if the expected metrics does not match
   */
Test End to End example from MonitoringExporter github project.
@throws Exception if test fails to execute all of the steps or if the expected metrics does not match
Test End to End example from MonitoringExporter github project . @throws Exception if test fails to execute all of the steps or if the expected metrics does not match
@Test
  @Order(1)
  public void testEndToEndViaChart() throws Exception {
    Assumptions.assumeTrue(FULLTEST);
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);
    try {
      configureDomainInPrometheus(domainNS1, domainNS1, domainNS2, domainNS2);
      createWlsImageAndDeploy();
      checkPromGrafana("wls_servlet_execution_time_average", "test-webapp");
      fireAlert();
      addMonitoringToExistedDomain();
    } catch (Exception ex) {
      configureDomainInPrometheus(domainNS2, domainNS2, domainNS1, domainNS1);
      throw ex;
    } finally {
      String crdCmd =
          " kubectl delete -f " + monitoringExporterEndToEndDir + "/demo-domains/domainInImage.yaml";
      ExecCommand.exec(crdCmd);
      crdCmd = "kubectl delete secret " + domainNS2 + "-weblogic-credentials";
      ExecCommand.exec(crdCmd);
      TestUtils.deleteWeblogicDomainResources(domainNS2);
    }
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - " + testMethodName);
  }
@ Test @ Order ( 1 ) public void testEndToEndViaChart ( ) throws Exception { Assumptions . assumeTrue ( FULLTEST ) ; String testMethodName = new Object ( ) { } . getClass ( ) . getEnclosingMethod ( ) . getName ( ) ; logTestBegin ( testMethodName ) ; try { configureDomainInPrometheus ( domainNS1 , domainNS1 , domainNS2 , domainNS2 ) ; createWlsImageAndDeploy ( ) ; checkPromGrafana ( "wls_servlet_execution_time_average" , "test-webapp" ) ; fireAlert ( ) ; addMonitoringToExistedDomain ( ) ; } catch ( Exception ex ) { configureDomainInPrometheus ( domainNS2 , domainNS2 , domainNS1 , domainNS1 ) ; throw ex ; } finally { String crdCmd = " kubectl delete -f " + monitoringExporterEndToEndDir + "/demo-domains/domainInImage.yaml" ; ExecCommand . exec ( crdCmd ) ; crdCmd = "kubectl delete secret " + domainNS2 + "-weblogic-credentials" ; ExecCommand . exec ( crdCmd ) ; TestUtils . deleteWeblogicDomainResources ( domainNS2 ) ; } LoggerHelper . getLocal ( ) . log ( Level . INFO , "SUCCESS - " + testMethodName ) ; }
Test End to End example from MonitoringExporter github project.
Test End to End example from MonitoringExporter github project .
//switch Perforce to use domain in pv