new-integration-tests/src/test/java/oracle/weblogic/kubernetes/ItConfigDistributionStrategy.java
@BeforeAll
  public void initAll(@Namespaces(2) List<String> namespaces) {
    logger = getLogger();

    logger.info("Assign a unique namespace for operator");
    assertNotNull(namespaces.get(0), "Namespace is null");
    opNamespace = namespaces.get(0);
    logger.info("Assign a unique namespace for domain namspace");
    assertNotNull(namespaces.get(1), "Namespace is null");
    domainNamespace = namespaces.get(1);
    
    // install operator and verify its running in ready state
    installAndVerifyOperator(opNamespace, domainNamespace);

    //determine if the tests are running in Kind cluster. if true use images from Kind registry
    if (KIND_REPO != null) {
      String kindRepoImage = KIND_REPO + image.substring(TestConstants.OCR_REGISTRY.length() + 1);
      logger.info("Using image {0}", kindRepoImage);
      image = kindRepoImage;
      isUseSecret = false;
    } else {
      // create pull secrets for WebLogic image when running in non Kind Kubernetes cluster
      createOCRRepoSecret(domainNamespace);
    }

    //start two MySQL database instances
    createMySQLDB("mysqldb-1", "root", "root123", 0, domainNamespace, null);
    mysqlDBPort1 = getMySQLNodePort(domainNamespace, "mysqldb-1");
    createMySQLDB("mysqldb-2", "root", "root456", 0, domainNamespace, null);
    mysqlDBPort2 = getMySQLNodePort(domainNamespace, "mysqldb-2");

    dsUrl1 = "jdbc:mysql://" + K8S_NODEPORT_HOST + ":" + mysqlDBPort1;
    dsUrl2 = "jdbc:mysql://" + K8S_NODEPORT_HOST + ":" + mysqlDBPort2;

    // build the clusterview application
    Path distDir = buildApplication(Paths.get(APP_DIR, "clusterview"),
        null, null, "dist", domainNamespace);
    clusterViewAppPath = Paths.get(distDir.toString(), "clusterview.war");
    assertTrue(clusterViewAppPath.toFile().exists(), "Application archive is not available");

    //create and start WebLogic domain
    createDomain();
    //create a jdbc resource targeted to cluster
    createJdbcDataSource(dsName0, "root", "root123", mysqlDBPort1);
    createJdbcDataSource(dsName1, "root", "root123", mysqlDBPort1);
    //deploy application to view server configuration
    deployApplication(clusterName + "," + adminServerName);

  }
/**
   * Assigns unique namespaces for operator and domains.
   * Pulls WebLogic image if running tests in Kind cluster.
   * Installs operator.
   * Creates 2 MySQL database instances.
   * Creates and starts WebLogic domain containing 2 instances in dynamic cluser.
   * Creates 2 JDBC data sources targeted to cluster.
   * Deploys clusterview application to cluster and admin targets.
   *
   * @param namespaces injected by JUnit
   */
Assigns unique namespaces for operator and domains.
Pulls WebLogic image if running tests in Kind cluster.
Installs operator.
Creates 2 MySQL database instances.
Creates and starts WebLogic domain containing 2 instances in dynamic cluser.
Creates 2 JDBC data sources targeted to cluster.
Deploys clusterview application to cluster and admin targets.

@param namespaces injected by JUnit
Assigns unique namespaces for operator and domains . Pulls WebLogic image if running tests in Kind cluster . Installs operator . Creates 2 MySQL database instances . Creates and starts WebLogic domain containing 2 instances in dynamic cluser . Creates 2 JDBC data sources targeted to cluster . Deploys clusterview application to cluster and admin targets . @param namespaces injected by JUnit
@BeforeAll
  public void initAll(@Namespaces(2) List<String> namespaces) {
    logger = getLogger();
    logger.info("Assign a unique namespace for operator");
    assertNotNull(namespaces.get(0), "Namespace is null");
    opNamespace = namespaces.get(0);
    logger.info("Assign a unique namespace for domain namspace");
    assertNotNull(namespaces.get(1), "Namespace is null");
    domainNamespace = namespaces.get(1);
    installAndVerifyOperator(opNamespace, domainNamespace);
    if (KIND_REPO != null) {
      String kindRepoImage = KIND_REPO + image.substring(TestConstants.OCR_REGISTRY.length() + 1);
      logger.info("Using image {0}", kindRepoImage);
      image = kindRepoImage;
      isUseSecret = false;
    } else {
      createOCRRepoSecret(domainNamespace);
    }
    createMySQLDB("mysqldb-1", "root", "root123", 0, domainNamespace, null);
    mysqlDBPort1 = getMySQLNodePort(domainNamespace, "mysqldb-1");
    createMySQLDB("mysqldb-2", "root", "root456", 0, domainNamespace, null);
    mysqlDBPort2 = getMySQLNodePort(domainNamespace, "mysqldb-2");
    dsUrl1 = "jdbc:mysql://" + K8S_NODEPORT_HOST + ":" + mysqlDBPort1;
    dsUrl2 = "jdbc:mysql://" + K8S_NODEPORT_HOST + ":" + mysqlDBPort2;
    Path distDir = buildApplication(Paths.get(APP_DIR, "clusterview"),
        null, null, "dist", domainNamespace);
    clusterViewAppPath = Paths.get(distDir.toString(), "clusterview.war");
    assertTrue(clusterViewAppPath.toFile().exists(), "Application archive is not available");
    createDomain();
    createJdbcDataSource(dsName0, "root", "root123", mysqlDBPort1);
    createJdbcDataSource(dsName1, "root", "root123", mysqlDBPort1);
    deployApplication(clusterName + "," + adminServerName);
  }
@ BeforeAll public void initAll ( @ Namespaces ( 2 ) List < String > namespaces ) { logger = getLogger ( ) ; logger . info ( "Assign a unique namespace for operator" ) ; assertNotNull ( namespaces . get ( 0 ) , "Namespace is null" ) ; opNamespace = namespaces . get ( 0 ) ; logger . info ( "Assign a unique namespace for domain namspace" ) ; assertNotNull ( namespaces . get ( 1 ) , "Namespace is null" ) ; domainNamespace = namespaces . get ( 1 ) ; installAndVerifyOperator ( opNamespace , domainNamespace ) ; if ( KIND_REPO != null ) { String kindRepoImage = KIND_REPO + image . substring ( TestConstants . OCR_REGISTRY . length ( ) + 1 ) ; logger . info ( "Using image {0}" , kindRepoImage ) ; image = kindRepoImage ; isUseSecret = false ; } else { createOCRRepoSecret ( domainNamespace ) ; } createMySQLDB ( "mysqldb-1" , "root" , "root123" , 0 , domainNamespace , null ) ; mysqlDBPort1 = getMySQLNodePort ( domainNamespace , "mysqldb-1" ) ; createMySQLDB ( "mysqldb-2" , "root" , "root456" , 0 , domainNamespace , null ) ; mysqlDBPort2 = getMySQLNodePort ( domainNamespace , "mysqldb-2" ) ; dsUrl1 = "jdbc:mysql://" + K8S_NODEPORT_HOST + ":" + mysqlDBPort1 ; dsUrl2 = "jdbc:mysql://" + K8S_NODEPORT_HOST + ":" + mysqlDBPort2 ; Path distDir = buildApplication ( Paths . get ( APP_DIR , "clusterview" ) , null , null , "dist" , domainNamespace ) ; clusterViewAppPath = Paths . get ( distDir . toString ( ) , "clusterview.war" ) ; assertTrue ( clusterViewAppPath . toFile ( ) . exists ( ) , "Application archive is not available" ) ; createDomain ( ) ; createJdbcDataSource ( dsName0 , "root" , "root123" , mysqlDBPort1 ) ; createJdbcDataSource ( dsName1 , "root" , "root123" , mysqlDBPort1 ) ; deployApplication ( clusterName + "," + adminServerName ) ; }
Assigns unique namespaces for operator and domains.
Assigns unique namespaces for operator and domains .
// install operator and verify its running in ready state //determine if the tests are running in Kind cluster. if true use images from Kind registry // create pull secrets for WebLogic image when running in non Kind Kubernetes cluster //start two MySQL database instances // build the clusterview application //create and start WebLogic domain //create a jdbc resource targeted to cluster //deploy application to view server configuration