new-integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMonitoringExporter.java
private static void createAndVerifyDomain(String miiImage,
                                            String domainUid,
                                            String namespace,
                                            String domainHomeSource,
                                            int replicaCount) {
    // create secret for admin credentials
    logger.info("Create secret for admin credentials");
    String adminSecretName = "weblogic-credentials";
    assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName, namespace,
        "weblogic", "welcome1"),
        String.format("create secret for admin credentials failed for %s", adminSecretName));

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

    // create domain and verify
    logger.info("Create model in image domain {0} in namespace {1} using docker image {2}",
        domainUid, namespace, miiImage);
    createDomainCrAndVerify(adminSecretName, REPO_SECRET_NAME, encryptionSecretName, miiImage,domainUid,
            namespace, domainHomeSource, replicaCount);
    String adminServerPodName = domainUid + "-admin-server";

    // check that admin service exists in the domain namespace
    logger.info("Checking that admin service {0} exists in namespace {1}",
            adminServerPodName, namespace);
    checkServiceExists(adminServerPodName, namespace);

    // check that admin server pod is ready
    logger.info("Checking that admin server pod {0} is ready in namespace {1}",
        adminServerPodName, namespace);
    checkPodReady(adminServerPodName, domainUid, namespace);

    String managedServerPrefix = domainUid + "-managed-server";
    // check for managed server pods existence in the domain namespace
    for (int i = 1; i <= replicaCount; i++) {
      String managedServerPodName = managedServerPrefix + i;

      // check that the managed server pod exists
      logger.info("Checking that managed server pod {0} exists in namespace {1}",
          managedServerPodName, namespace);
      checkPodExists(managedServerPodName, domainUid, namespace);

      // check that the managed server pod is ready
      logger.info("Checking that managed server pod {0} is ready in namespace {1}",
          managedServerPodName, namespace);
      checkPodReady(managedServerPodName, domainUid, namespace);

      // check that the managed server service exists in the domain namespace
      logger.info("Checking that managed server service {0} exists in namespace {1}",
          managedServerPodName, namespace);
      checkServiceExists(managedServerPodName, namespace);
    }
  }
//create domain from provided image and verify it's start
create domain from provided image and verify it's start
create domain from provided image and verify it ' s start
private static void createAndVerifyDomain(String miiImage,
                                            String domainUid,
                                            String namespace,
                                            String domainHomeSource,
                                            int replicaCount) {
    logger.info("Create secret for admin credentials");
    String adminSecretName = "weblogic-credentials";
    assertDoesNotThrow(() -> createSecretWithUsernamePassword(adminSecretName, namespace,
        "weblogic", "welcome1"),
        String.format("create secret for admin credentials failed for %s", adminSecretName));
    logger.info("Create encryption secret");
    String encryptionSecretName = "encryptionsecret";
    assertDoesNotThrow(() -> createSecretWithUsernamePassword(encryptionSecretName, namespace,
        "weblogicenc", "weblogicenc"),
        String.format("create encryption secret failed for %s", encryptionSecretName));
    logger.info("Create model in image domain {0} in namespace {1} using docker image {2}",
        domainUid, namespace, miiImage);
    createDomainCrAndVerify(adminSecretName, REPO_SECRET_NAME, encryptionSecretName, miiImage,domainUid,
            namespace, domainHomeSource, replicaCount);
    String adminServerPodName = domainUid + "-admin-server";
    logger.info("Checking that admin service {0} exists in namespace {1}",
            adminServerPodName, namespace);
    checkServiceExists(adminServerPodName, namespace);
    logger.info("Checking that admin server pod {0} is ready in namespace {1}",
        adminServerPodName, namespace);
    checkPodReady(adminServerPodName, domainUid, namespace);
    String managedServerPrefix = domainUid + "-managed-server";
    for (int i = 1; i <= replicaCount; i++) {
      String managedServerPodName = managedServerPrefix + i;
      logger.info("Checking that managed server pod {0} exists in namespace {1}",
          managedServerPodName, namespace);
      checkPodExists(managedServerPodName, domainUid, namespace);
      logger.info("Checking that managed server pod {0} is ready in namespace {1}",
          managedServerPodName, namespace);
      checkPodReady(managedServerPodName, domainUid, namespace);
      logger.info("Checking that managed server service {0} exists in namespace {1}",
          managedServerPodName, namespace);
      checkServiceExists(managedServerPodName, namespace);
    }
  }
private static void createAndVerifyDomain ( String miiImage , String domainUid , String namespace , String domainHomeSource , int replicaCount ) { logger . info ( "Create secret for admin credentials" ) ; String adminSecretName = "weblogic-credentials" ; assertDoesNotThrow ( ( ) -> createSecretWithUsernamePassword ( adminSecretName , namespace , "weblogic" , "welcome1" ) , String . format ( "create secret for admin credentials failed for %s" , adminSecretName ) ) ; logger . info ( "Create encryption secret" ) ; String encryptionSecretName = "encryptionsecret" ; assertDoesNotThrow ( ( ) -> createSecretWithUsernamePassword ( encryptionSecretName , namespace , "weblogicenc" , "weblogicenc" ) , String . format ( "create encryption secret failed for %s" , encryptionSecretName ) ) ; logger . info ( "Create model in image domain {0} in namespace {1} using docker image {2}" , domainUid , namespace , miiImage ) ; createDomainCrAndVerify ( adminSecretName , REPO_SECRET_NAME , encryptionSecretName , miiImage , domainUid , namespace , domainHomeSource , replicaCount ) ; String adminServerPodName = domainUid + "-admin-server" ; logger . info ( "Checking that admin service {0} exists in namespace {1}" , adminServerPodName , namespace ) ; checkServiceExists ( adminServerPodName , namespace ) ; logger . info ( "Checking that admin server pod {0} is ready in namespace {1}" , adminServerPodName , namespace ) ; checkPodReady ( adminServerPodName , domainUid , namespace ) ; String managedServerPrefix = domainUid + "-managed-server" ; for ( int i = 1 ; i <= replicaCount ; i ++ ) { String managedServerPodName = managedServerPrefix + i ; logger . info ( "Checking that managed server pod {0} exists in namespace {1}" , managedServerPodName , namespace ) ; checkPodExists ( managedServerPodName , domainUid , namespace ) ; logger . info ( "Checking that managed server pod {0} is ready in namespace {1}" , managedServerPodName , namespace ) ; checkPodReady ( managedServerPodName , domainUid , namespace ) ; logger . info ( "Checking that managed server service {0} exists in namespace {1}" , managedServerPodName , namespace ) ; checkServiceExists ( managedServerPodName , namespace ) ; } }
create domain from provided image and verify it's start
create domain from provided image and verify it ' s start
// create secret for admin credentials // create encryption secret // create domain and verify // check that admin service exists in the domain namespace // check that admin server pod is ready // check for managed server pods existence in the domain namespace // check that the managed server pod exists // check that the managed server pod is ready // check that the managed server service exists in the domain namespace