new-integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/CommonTestUtils.java
public static HelmParams installAndVerifyNginx(String nginxNamespace,
                                                 int nodeportshttp,
                                                 int nodeportshttps) {
    LoggingFacade logger = getLogger();
    // Helm install parameters
    HelmParams nginxHelmParams = new HelmParams()
        .releaseName(NGINX_RELEASE_NAME + "-" + nginxNamespace.substring(3))
        .namespace(nginxNamespace)
        .repoUrl(GOOGLE_REPO_URL)
        .repoName(STABLE_REPO_NAME)
        .chartName(NGINX_CHART_NAME);

    // NGINX chart values to override
    NginxParams nginxParams = new NginxParams()
        .helmParams(nginxHelmParams);

    if (nodeportshttp != 0 && nodeportshttps != 0) {
      nginxParams
          .nodePortsHttp(nodeportshttp)
          .nodePortsHttps(nodeportshttps);
    }

    // install NGINX
    assertThat(installNginx(nginxParams))
        .as("Test NGINX installation succeeds")
        .withFailMessage("NGINX installation is failed")
        .isTrue();

    // verify that NGINX is installed
    logger.info("Checking NGINX release {0} status in namespace {1}",
        NGINX_RELEASE_NAME, nginxNamespace);
    assertTrue(isHelmReleaseDeployed(NGINX_RELEASE_NAME, nginxNamespace),
        String.format("NGINX release %s is not in deployed status in namespace %s",
            NGINX_RELEASE_NAME, nginxNamespace));
    logger.info("NGINX release {0} status is deployed in namespace {1}",
        NGINX_RELEASE_NAME, nginxNamespace);

    // wait until the NGINX pod is ready.
    withStandardRetryPolicy
        .conditionEvaluationListener(
            condition -> logger.info(
                "Waiting for NGINX to be ready in namespace {0} (elapsed time {1}ms, remaining time {2}ms)",
                nginxNamespace,
                condition.getElapsedTimeInMS(),
                condition.getRemainingTimeInMS()))
        .until(assertDoesNotThrow(() -> isNginxReady(nginxNamespace), "isNginxReady failed with ApiException"));

    return nginxHelmParams;
  }
/**
   * Install NGINX and wait up to five minutes until the NGINX pod is ready.
   *
   * @param nginxNamespace the namespace in which the NGINX will be installed
   * @param nodeportshttp the http nodeport of NGINX
   * @param nodeportshttps the https nodeport of NGINX
   * @return the NGINX Helm installation parameters
   */
Install NGINX and wait up to five minutes until the NGINX pod is ready.
@param nginxNamespace the namespace in which the NGINX will be installed
@param nodeportshttp the http nodeport of NGINX
@param nodeportshttps the https nodeport of NGINX
@return the NGINX Helm installation parameters
Install NGINX and wait up to five minutes until the NGINX pod is ready . @param nginxNamespace the namespace in which the NGINX will be installed @param nodeportshttp the http nodeport of NGINX @param nodeportshttps the https nodeport of NGINX @return the NGINX Helm installation parameters
public static HelmParams installAndVerifyNginx(String nginxNamespace,
                                                 int nodeportshttp,
                                                 int nodeportshttps) {
    LoggingFacade logger = getLogger();
    HelmParams nginxHelmParams = new HelmParams()
        .releaseName(NGINX_RELEASE_NAME + "-" + nginxNamespace.substring(3))
        .namespace(nginxNamespace)
        .repoUrl(GOOGLE_REPO_URL)
        .repoName(STABLE_REPO_NAME)
        .chartName(NGINX_CHART_NAME);
    NginxParams nginxParams = new NginxParams()
        .helmParams(nginxHelmParams);
    if (nodeportshttp != 0 && nodeportshttps != 0) {
      nginxParams
          .nodePortsHttp(nodeportshttp)
          .nodePortsHttps(nodeportshttps);
    }
    assertThat(installNginx(nginxParams))
        .as("Test NGINX installation succeeds")
        .withFailMessage("NGINX installation is failed")
        .isTrue();
    logger.info("Checking NGINX release {0} status in namespace {1}",
        NGINX_RELEASE_NAME, nginxNamespace);
    assertTrue(isHelmReleaseDeployed(NGINX_RELEASE_NAME, nginxNamespace),
        String.format("NGINX release %s is not in deployed status in namespace %s",
            NGINX_RELEASE_NAME, nginxNamespace));
    logger.info("NGINX release {0} status is deployed in namespace {1}",
        NGINX_RELEASE_NAME, nginxNamespace);
    withStandardRetryPolicy
        .conditionEvaluationListener(
            condition -> logger.info(
                "Waiting for NGINX to be ready in namespace {0} (elapsed time {1}ms, remaining time {2}ms)",
                nginxNamespace,
                condition.getElapsedTimeInMS(),
                condition.getRemainingTimeInMS()))
        .until(assertDoesNotThrow(() -> isNginxReady(nginxNamespace), "isNginxReady failed with ApiException"));
    return nginxHelmParams;
  }
public static HelmParams installAndVerifyNginx ( String nginxNamespace , int nodeportshttp , int nodeportshttps ) { LoggingFacade logger = getLogger ( ) ; HelmParams nginxHelmParams = new HelmParams ( ) . releaseName ( NGINX_RELEASE_NAME + "-" + nginxNamespace . substring ( 3 ) ) . namespace ( nginxNamespace ) . repoUrl ( GOOGLE_REPO_URL ) . repoName ( STABLE_REPO_NAME ) . chartName ( NGINX_CHART_NAME ) ; NginxParams nginxParams = new NginxParams ( ) . helmParams ( nginxHelmParams ) ; if ( nodeportshttp != 0 && nodeportshttps != 0 ) { nginxParams . nodePortsHttp ( nodeportshttp ) . nodePortsHttps ( nodeportshttps ) ; } assertThat ( installNginx ( nginxParams ) ) . as ( "Test NGINX installation succeeds" ) . withFailMessage ( "NGINX installation is failed" ) . isTrue ( ) ; logger . info ( "Checking NGINX release {0} status in namespace {1}" , NGINX_RELEASE_NAME , nginxNamespace ) ; assertTrue ( isHelmReleaseDeployed ( NGINX_RELEASE_NAME , nginxNamespace ) , String . format ( "NGINX release %s is not in deployed status in namespace %s" , NGINX_RELEASE_NAME , nginxNamespace ) ) ; logger . info ( "NGINX release {0} status is deployed in namespace {1}" , NGINX_RELEASE_NAME , nginxNamespace ) ; withStandardRetryPolicy . conditionEvaluationListener ( condition -> logger . info ( "Waiting for NGINX to be ready in namespace {0} (elapsed time {1}ms, remaining time {2}ms)" , nginxNamespace , condition . getElapsedTimeInMS ( ) , condition . getRemainingTimeInMS ( ) ) ) . until ( assertDoesNotThrow ( ( ) -> isNginxReady ( nginxNamespace ) , "isNginxReady failed with ApiException" ) ) ; return nginxHelmParams ; }
Install NGINX and wait up to five minutes until the NGINX pod is ready.
Install NGINX and wait up to five minutes until the NGINX pod is ready .
// Helm install parameters // NGINX chart values to override // install NGINX // verify that NGINX is installed // wait until the NGINX pod is ready.