new-integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiMultiModel.java
@Test
  @DisplayName("Create a model-in-image domain with two WDT model files in the image")
  @Slow
  public void testMiiWithMultiModelImage() {
    final String adminServerPodName = String.format("%s-%s", domainUid2, ADMIN_SERVER_NAME_BASE);
    final String managedServerPrefix = String.format("%s-%s", domainUid2, MANAGED_SERVER_NAME_BASE);
    final String expectedMaxCapacity = "20";

    logger.info("Create domain {0} in namespace {1} with image {2} that contains WDT models {3} and {4}",
        domainUid2, domainNamespace, miiImageMultiModel, modelFileName2, modelFileName1);
    createDomainResourceAndVerify(
        domainUid2,
        domainNamespace,
        adminServerPodName,
        managedServerPrefix, 
        miiImageMultiModel,
        null);

    logger.info("Check the MaxCapacity setting of DataSource {0}", dsName);
    String maxCapacityValue = getDSMaxCapacity(adminServerPodName, domainNamespace, dsName);
    assertEquals(expectedMaxCapacity, maxCapacityValue, 
        String.format("Domain %s in namespace %s DataSource %s MaxCapacity is %s, instead of %s",
            domainUid2, domainNamespace, dsName, maxCapacityValue, expectedMaxCapacity));

    logger.info(String.format("Domain %s in namespace %s DataSource %s MaxCapacity is %s, as expected",
            domainUid2, domainNamespace, dsName, expectedMaxCapacity));

    logger.info("Check DataSource {0} does not exist", dsName2);
    assertTrue(dsDoesNotExist(adminServerPodName, domainNamespace, dsName2),
        String.format("Domain %s in namespace %s DataSource %s should not exist",
            domainUid2, domainNamespace, dsName2));

    logger.info(String.format("Domain %s in namespace %s DataSource %s does not exist as expected",
            domainUid2, domainNamespace, dsName2));

  }
/**
   * Test that two WDT model files in a model-in-image Docker image are applied in the expected order.
   *
   * <p>Create a WebLogic domain using a model-in-image Docker image that contains two WDT model files.
   * Verify that the effective configuration of the domain is as expected. </p>
   *
   * <p>The two model files specify the same DataSource "TestDataSource" with the connection pool's
   * MaxCapacity set to 15 and 20 respectively. In addition, the first model defines a second 
   * DataSource "TestDataSource2", which is deleted by the second model. </p>
   *
   * <p>According to the ordering rules, When the two model files are applied, the resultant domain should
   * only have "TestDataSource" with MaxCapacity set to 20, and "TestDataSource2" should not exist. </p>
   */
Test that two WDT model files in a model-in-image Docker image are applied in the expected order.
Create a WebLogic domain using a model-in-image Docker image that contains two WDT model files.
Verify that the effective configuration of the domain is as expected.

The two model files specify the same DataSource "TestDataSource" with the connection pool's
MaxCapacity set to 15 and 20 respectively. In addition, the first model defines a second
DataSource "TestDataSource2", which is deleted by the second model.

According to the ordering rules, When the two model files are applied, the resultant domain should
only have "TestDataSource" with MaxCapacity set to 20, and "TestDataSource2" should not exist.
Test that two WDT model files in a model - in - image Docker image are applied in the expected order . Create a WebLogic domain using a model - in - image Docker image that contains two WDT model files . Verify that the effective configuration of the domain is as expected . The two model files specify the same DataSource " TestDataSource " with the connection pool ' s MaxCapacity set to 15 and 20 respectively . In addition the first model defines a second DataSource " TestDataSource2 " which is deleted by the second model . According to the ordering rules When the two model files are applied the resultant domain should only have " TestDataSource " with MaxCapacity set to 20 and " TestDataSource2 " should not exist .
@Test
  @DisplayName("Create a model-in-image domain with two WDT model files in the image")
  @Slow
  public void testMiiWithMultiModelImage() {
    final String adminServerPodName = String.format("%s-%s", domainUid2, ADMIN_SERVER_NAME_BASE);
    final String managedServerPrefix = String.format("%s-%s", domainUid2, MANAGED_SERVER_NAME_BASE);
    final String expectedMaxCapacity = "20";
    logger.info("Create domain {0} in namespace {1} with image {2} that contains WDT models {3} and {4}",
        domainUid2, domainNamespace, miiImageMultiModel, modelFileName2, modelFileName1);
    createDomainResourceAndVerify(
        domainUid2,
        domainNamespace,
        adminServerPodName,
        managedServerPrefix, 
        miiImageMultiModel,
        null);
    logger.info("Check the MaxCapacity setting of DataSource {0}", dsName);
    String maxCapacityValue = getDSMaxCapacity(adminServerPodName, domainNamespace, dsName);
    assertEquals(expectedMaxCapacity, maxCapacityValue, 
        String.format("Domain %s in namespace %s DataSource %s MaxCapacity is %s, instead of %s",
            domainUid2, domainNamespace, dsName, maxCapacityValue, expectedMaxCapacity));
    logger.info(String.format("Domain %s in namespace %s DataSource %s MaxCapacity is %s, as expected",
            domainUid2, domainNamespace, dsName, expectedMaxCapacity));
    logger.info("Check DataSource {0} does not exist", dsName2);
    assertTrue(dsDoesNotExist(adminServerPodName, domainNamespace, dsName2),
        String.format("Domain %s in namespace %s DataSource %s should not exist",
            domainUid2, domainNamespace, dsName2));
    logger.info(String.format("Domain %s in namespace %s DataSource %s does not exist as expected",
            domainUid2, domainNamespace, dsName2));
  }
@ Test @ DisplayName ( "Create a model-in-image domain with two WDT model files in the image" ) @ Slow public void testMiiWithMultiModelImage ( ) { final String adminServerPodName = String . format ( "%s-%s" , domainUid2 , ADMIN_SERVER_NAME_BASE ) ; final String managedServerPrefix = String . format ( "%s-%s" , domainUid2 , MANAGED_SERVER_NAME_BASE ) ; final String expectedMaxCapacity = "20" ; logger . info ( "Create domain {0} in namespace {1} with image {2} that contains WDT models {3} and {4}" , domainUid2 , domainNamespace , miiImageMultiModel , modelFileName2 , modelFileName1 ) ; createDomainResourceAndVerify ( domainUid2 , domainNamespace , adminServerPodName , managedServerPrefix , miiImageMultiModel , null ) ; logger . info ( "Check the MaxCapacity setting of DataSource {0}" , dsName ) ; String maxCapacityValue = getDSMaxCapacity ( adminServerPodName , domainNamespace , dsName ) ; assertEquals ( expectedMaxCapacity , maxCapacityValue , String . format ( "Domain %s in namespace %s DataSource %s MaxCapacity is %s, instead of %s" , domainUid2 , domainNamespace , dsName , maxCapacityValue , expectedMaxCapacity ) ) ; logger . info ( String . format ( "Domain %s in namespace %s DataSource %s MaxCapacity is %s, as expected" , domainUid2 , domainNamespace , dsName , expectedMaxCapacity ) ) ; logger . info ( "Check DataSource {0} does not exist" , dsName2 ) ; assertTrue ( dsDoesNotExist ( adminServerPodName , domainNamespace , dsName2 ) , String . format ( "Domain %s in namespace %s DataSource %s should not exist" , domainUid2 , domainNamespace , dsName2 ) ) ; logger . info ( String . format ( "Domain %s in namespace %s DataSource %s does not exist as expected" , domainUid2 , domainNamespace , dsName2 ) ) ; }
Test that two WDT model files in a model-in-image Docker image are applied in the expected order.
Test that two WDT model files in a model - in - image Docker image are applied in the expected order .