new-integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiMultiModel.java
@BeforeAll
  public static void initAll(@Namespaces(2) List<String> namespaces) {
    logger = getLogger();
    // get a new unique opNamespace
    logger.info("Creating unique namespace for Operator");
    assertNotNull(namespaces.get(0), "Namespace list is null");
    String opNamespace = namespaces.get(0);

    logger.info("Creating unique namespace for Domain");
    assertNotNull(namespaces.get(1), "Namespace list is null");
    domainNamespace = namespaces.get(1);

    // install the operator
    logger.info("Install an operator in namespace {0}, managing namespace {1}",
        opNamespace, domainNamespace);
    installAndVerifyOperator(opNamespace, domainNamespace);

    logger.info("Create the repo secret {0} to pull the image", REPO_SECRET_NAME);
    assertDoesNotThrow(() -> createDockerRegistrySecret(domainNamespace),
            String.format("createSecret failed for %s", REPO_SECRET_NAME));

    // create secret for admin credentials
    logger.info("Create secret for admin credentials");
    adminSecretName = "weblogic-credentials";
    assertDoesNotThrow(() -> createSecretWithUsernamePassword(
        adminSecretName,
        domainNamespace,
        ADMIN_USERNAME_DEFAULT,
        ADMIN_PASSWORD_DEFAULT),
        String.format("createSecret failed for %s", adminSecretName));

    // create encryption secret
    logger.info("Create encryption secret");
    encryptionSecretName = "encryptionsecret";
    assertDoesNotThrow(() -> createSecretWithUsernamePassword(
        encryptionSecretName,
        domainNamespace,
        "weblogicenc",
        "weblogicenc"),
        String.format("createSecret failed for %s", encryptionSecretName));

    logger.info("Create an image with two model files");
    miiImageMultiModel = createMiiImageAndVerify(
        "mii-test-multi-model-image",
        Arrays.asList(
            MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE, 
            MODEL_DIR + "/" + modelFileName2, 
            MODEL_DIR + "/" + modelFileName1),
        Collections.singletonList(MII_BASIC_APP_NAME));

    // push the image to a registry to make it accessible in multi-node cluster
    dockerLoginAndPushImageToRegistry(miiImageMultiModel);

  }
/**
   * Perform initialization for all the tests in this class.
   *
   * <p>Set up the necessary namespaces and install the operator in the first namespace, and
   * create a model-in-image image with two WDT model files. </p>
   *
   * @param namespaces list of namespaces created by the IntegrationTestWatcher by the
   *                   JUnit engine parameter resolution mechanism
   */
Perform initialization for all the tests in this class.
Set up the necessary namespaces and install the operator in the first namespace, and
create a model-in-image image with two WDT model files.

@param namespaces list of namespaces created by the IntegrationTestWatcher by the
JUnit engine parameter resolution mechanism
Perform initialization for all the tests in this class . Set up the necessary namespaces and install the operator in the first namespace and create a model - in - image image with two WDT model files . @param namespaces list of namespaces created by the IntegrationTestWatcher by the JUnit engine parameter resolution mechanism
@BeforeAll
  public static void initAll(@Namespaces(2) List<String> namespaces) {
    logger = getLogger();
    logger.info("Creating unique namespace for Operator");
    assertNotNull(namespaces.get(0), "Namespace list is null");
    String opNamespace = namespaces.get(0);
    logger.info("Creating unique namespace for Domain");
    assertNotNull(namespaces.get(1), "Namespace list is null");
    domainNamespace = namespaces.get(1);
    logger.info("Install an operator in namespace {0}, managing namespace {1}",
        opNamespace, domainNamespace);
    installAndVerifyOperator(opNamespace, domainNamespace);
    logger.info("Create the repo secret {0} to pull the image", REPO_SECRET_NAME);
    assertDoesNotThrow(() -> createDockerRegistrySecret(domainNamespace),
            String.format("createSecret failed for %s", REPO_SECRET_NAME));
    logger.info("Create secret for admin credentials");
    adminSecretName = "weblogic-credentials";
    assertDoesNotThrow(() -> createSecretWithUsernamePassword(
        adminSecretName,
        domainNamespace,
        ADMIN_USERNAME_DEFAULT,
        ADMIN_PASSWORD_DEFAULT),
        String.format("createSecret failed for %s", adminSecretName));
    logger.info("Create encryption secret");
    encryptionSecretName = "encryptionsecret";
    assertDoesNotThrow(() -> createSecretWithUsernamePassword(
        encryptionSecretName,
        domainNamespace,
        "weblogicenc",
        "weblogicenc"),
        String.format("createSecret failed for %s", encryptionSecretName));
    logger.info("Create an image with two model files");
    miiImageMultiModel = createMiiImageAndVerify(
        "mii-test-multi-model-image",
        Arrays.asList(
            MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE, 
            MODEL_DIR + "/" + modelFileName2, 
            MODEL_DIR + "/" + modelFileName1),
        Collections.singletonList(MII_BASIC_APP_NAME));
    dockerLoginAndPushImageToRegistry(miiImageMultiModel);
  }
@ BeforeAll public static void initAll ( @ Namespaces ( 2 ) List < String > namespaces ) { logger = getLogger ( ) ; logger . info ( "Creating unique namespace for Operator" ) ; assertNotNull ( namespaces . get ( 0 ) , "Namespace list is null" ) ; String opNamespace = namespaces . get ( 0 ) ; logger . info ( "Creating unique namespace for Domain" ) ; assertNotNull ( namespaces . get ( 1 ) , "Namespace list is null" ) ; domainNamespace = namespaces . get ( 1 ) ; logger . info ( "Install an operator in namespace {0}, managing namespace {1}" , opNamespace , domainNamespace ) ; installAndVerifyOperator ( opNamespace , domainNamespace ) ; logger . info ( "Create the repo secret {0} to pull the image" , REPO_SECRET_NAME ) ; assertDoesNotThrow ( ( ) -> createDockerRegistrySecret ( domainNamespace ) , String . format ( "createSecret failed for %s" , REPO_SECRET_NAME ) ) ; logger . info ( "Create secret for admin credentials" ) ; adminSecretName = "weblogic-credentials" ; assertDoesNotThrow ( ( ) -> createSecretWithUsernamePassword ( adminSecretName , domainNamespace , ADMIN_USERNAME_DEFAULT , ADMIN_PASSWORD_DEFAULT ) , String . format ( "createSecret failed for %s" , adminSecretName ) ) ; logger . info ( "Create encryption secret" ) ; encryptionSecretName = "encryptionsecret" ; assertDoesNotThrow ( ( ) -> createSecretWithUsernamePassword ( encryptionSecretName , domainNamespace , "weblogicenc" , "weblogicenc" ) , String . format ( "createSecret failed for %s" , encryptionSecretName ) ) ; logger . info ( "Create an image with two model files" ) ; miiImageMultiModel = createMiiImageAndVerify ( "mii-test-multi-model-image" , Arrays . asList ( MODEL_DIR + "/" + MII_BASIC_WDT_MODEL_FILE , MODEL_DIR + "/" + modelFileName2 , MODEL_DIR + "/" + modelFileName1 ) , Collections . singletonList ( MII_BASIC_APP_NAME ) ) ; dockerLoginAndPushImageToRegistry ( miiImageMultiModel ) ; }
Perform initialization for all the tests in this class.
Perform initialization for all the tests in this class .
// get a new unique opNamespace // install the operator // create secret for admin credentials // create encryption secret // push the image to a registry to make it accessible in multi-node cluster