new-integration-tests/src/test/java/oracle/weblogic/kubernetes/ItOperatorTwoDomains.java
@BeforeAll
  public static void initAll(@Namespaces(4) List<String> namespaces) {
    logger = getLogger();
    // get unique operator namespaces
    logger.info("Get unique namespaces for operator1 and operator2");
    for (int i = 0; i < numberOfOperators; i++) {
      assertNotNull(namespaces.get(i), "Namespace list is null");
      opNamespaces.add(namespaces.get(i));
    }

    // get unique domain namespaces
    logger.info("Get unique namespaces for WebLogic domain1 and domain2");
    for (int i = numberOfOperators; i < numberOfOperators + numberOfDomains; i++) {
      assertNotNull(namespaces.get(i), "Namespace list is null");
      domainNamespaces.add(namespaces.get(i));
    }

    // install and verify operator
    for (int i = 0; i < numberOfOperators; i++) {
      installAndVerifyOperator(opNamespaces.get(i), domainNamespaces.get(i));
    }

    // initiate domainUid list for two domains
    for (int i = 1; i <= numberOfDomains; i++) {
      domainUids.add("domain" + i);
    }

    domain1Uid = domainUids.get(0);
    domain2Uid = domainUids.get(1);
    domain1Namespace = domainNamespaces.get(0);
    domain2Namespace = domainNamespaces.get(1);

    //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(OCR_REGISTRY.length() + 1);
      logger.info("Using image {0}", kindRepoImage);
      image = kindRepoImage;
      isUseSecret = false;
    }
  }
/**
   * Get namespaces, install operator and initiate domain UID list.
   *
   * @param namespaces injected by JUnit
   */
Get namespaces, install operator and initiate domain UID list.
@param namespaces injected by JUnit
Get namespaces install operator and initiate domain UID list . @param namespaces injected by JUnit
@BeforeAll
  public static void initAll(@Namespaces(4) List<String> namespaces) {
    logger = getLogger();
    logger.info("Get unique namespaces for operator1 and operator2");
    for (int i = 0; i < numberOfOperators; i++) {
      assertNotNull(namespaces.get(i), "Namespace list is null");
      opNamespaces.add(namespaces.get(i));
    }
    logger.info("Get unique namespaces for WebLogic domain1 and domain2");
    for (int i = numberOfOperators; i < numberOfOperators + numberOfDomains; i++) {
      assertNotNull(namespaces.get(i), "Namespace list is null");
      domainNamespaces.add(namespaces.get(i));
    }
    for (int i = 0; i < numberOfOperators; i++) {
      installAndVerifyOperator(opNamespaces.get(i), domainNamespaces.get(i));
    }
    for (int i = 1; i <= numberOfDomains; i++) {
      domainUids.add("domain" + i);
    }
    domain1Uid = domainUids.get(0);
    domain2Uid = domainUids.get(1);
    domain1Namespace = domainNamespaces.get(0);
    domain2Namespace = domainNamespaces.get(1);
    if (KIND_REPO != null) {
      String kindRepoImage = KIND_REPO + image.substring(OCR_REGISTRY.length() + 1);
      logger.info("Using image {0}", kindRepoImage);
      image = kindRepoImage;
      isUseSecret = false;
    }
  }
@ BeforeAll public static void initAll ( @ Namespaces ( 4 ) List < String > namespaces ) { logger = getLogger ( ) ; logger . info ( "Get unique namespaces for operator1 and operator2" ) ; for ( int i = 0 ; i < numberOfOperators ; i ++ ) { assertNotNull ( namespaces . get ( i ) , "Namespace list is null" ) ; opNamespaces . add ( namespaces . get ( i ) ) ; } logger . info ( "Get unique namespaces for WebLogic domain1 and domain2" ) ; for ( int i = numberOfOperators ; i < numberOfOperators + numberOfDomains ; i ++ ) { assertNotNull ( namespaces . get ( i ) , "Namespace list is null" ) ; domainNamespaces . add ( namespaces . get ( i ) ) ; } for ( int i = 0 ; i < numberOfOperators ; i ++ ) { installAndVerifyOperator ( opNamespaces . get ( i ) , domainNamespaces . get ( i ) ) ; } for ( int i = 1 ; i <= numberOfDomains ; i ++ ) { domainUids . add ( "domain" + i ) ; } domain1Uid = domainUids . get ( 0 ) ; domain2Uid = domainUids . get ( 1 ) ; domain1Namespace = domainNamespaces . get ( 0 ) ; domain2Namespace = domainNamespaces . get ( 1 ) ; if ( KIND_REPO != null ) { String kindRepoImage = KIND_REPO + image . substring ( OCR_REGISTRY . length ( ) + 1 ) ; logger . info ( "Using image {0}" , kindRepoImage ) ; image = kindRepoImage ; isUseSecret = false ; } }
Get namespaces, install operator and initiate domain UID list.
Get namespaces install operator and initiate domain UID list .
// get unique operator namespaces // get unique domain namespaces // install and verify operator // initiate domainUid list for two domains //determine if the tests are running in Kind cluster. if true use images from Kind registry