integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java
public void verifyAdminConsoleViaLB() throws Exception {
    if (!loadBalancer.equals("APACHE")) {
      LoggerHelper.getLocal().log(Level.INFO, "This check is done only for APACHE load balancer");
      return;
    }
    String nodePortHost = getHostNameForCurl();
    int nodePort = getAdminSericeLbNodePort();
    String responseBodyFile =
        userProjectsDir + "/weblogic-domains/" + domainUid + "/testconsole.response.body";
    LoggerHelper.getLocal().log(
        Level.INFO, "nodePortHost " + nodePortHost + " nodePort " + nodePort);

    StringBuffer cmd = new StringBuffer();
    cmd.append("curl --silent --show-error --noproxy ")
        .append(nodePortHost)
        .append(" http://")
        .append(nodePortHost)
        .append(":")
        .append(nodePort)
        .append("/console/login/LoginForm.jsp")
        .append(" --write-out %{http_code} -o ")
        .append(responseBodyFile);
    LoggerHelper.getLocal().log(Level.INFO, "cmd for curl " + cmd);

    ExecResult result = TestUtils.execOrAbortProcess(cmd.toString());

    String output = result.stdout().trim();
    LoggerHelper.getLocal().log(Level.INFO, "output " + output);
    if (!output.equals("200")) {
      throw new RuntimeException(
          "FAILURE: accessing admin console via load balancer did not return 200 status code, got "
              + output);
    }
  }
/**
   * Access admin console using load balancer web port for Apache load balancer.
   *
   * @throws Exception If failed to access the console via LB
   */
Access admin console using load balancer web port for Apache load balancer.
@throws Exception If failed to access the console via LB
Access admin console using load balancer web port for Apache load balancer . @throws Exception If failed to access the console via LB
public void verifyAdminConsoleViaLB() throws Exception {
    if (!loadBalancer.equals("APACHE")) {
      LoggerHelper.getLocal().log(Level.INFO, "This check is done only for APACHE load balancer");
      return;
    }
    String nodePortHost = getHostNameForCurl();
    int nodePort = getAdminSericeLbNodePort();
    String responseBodyFile =
        userProjectsDir + "/weblogic-domains/" + domainUid + "/testconsole.response.body";
    LoggerHelper.getLocal().log(
        Level.INFO, "nodePortHost " + nodePortHost + " nodePort " + nodePort);
    StringBuffer cmd = new StringBuffer();
    cmd.append("curl --silent --show-error --noproxy ")
        .append(nodePortHost)
        .append(" http://")
        .append(nodePortHost)
        .append(":")
        .append(nodePort)
        .append("/console/login/LoginForm.jsp")
        .append(" --write-out %{http_code} -o ")
        .append(responseBodyFile);
    LoggerHelper.getLocal().log(Level.INFO, "cmd for curl " + cmd);
    ExecResult result = TestUtils.execOrAbortProcess(cmd.toString());
    String output = result.stdout().trim();
    LoggerHelper.getLocal().log(Level.INFO, "output " + output);
    if (!output.equals("200")) {
      throw new RuntimeException(
          "FAILURE: accessing admin console via load balancer did not return 200 status code, got "
              + output);
    }
  }
public void verifyAdminConsoleViaLB ( ) throws Exception { if ( ! loadBalancer . equals ( "APACHE" ) ) { LoggerHelper . getLocal ( ) . log ( Level . INFO , "This check is done only for APACHE load balancer" ) ; return ; } String nodePortHost = getHostNameForCurl ( ) ; int nodePort = getAdminSericeLbNodePort ( ) ; String responseBodyFile = userProjectsDir + "/weblogic-domains/" + domainUid + "/testconsole.response.body" ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "nodePortHost " + nodePortHost + " nodePort " + nodePort ) ; StringBuffer cmd = new StringBuffer ( ) ; cmd . append ( "curl --silent --show-error --noproxy " ) . append ( nodePortHost ) . append ( " http://" ) . append ( nodePortHost ) . append ( ":" ) . append ( nodePort ) . append ( "/console/login/LoginForm.jsp" ) . append ( " --write-out %{http_code} -o " ) . append ( responseBodyFile ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "cmd for curl " + cmd ) ; ExecResult result = TestUtils . execOrAbortProcess ( cmd . toString ( ) ) ; String output = result . stdout ( ) . trim ( ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "output " + output ) ; if ( ! output . equals ( "200" ) ) { throw new RuntimeException ( "FAILURE: accessing admin console via load balancer did not return 200 status code, got " + output ) ; } }
Access admin console using load balancer web port for Apache load balancer.
Access admin console using load balancer web port for Apache load balancer .