integration-tests/src/test/java/oracle/kubernetes/operator/ItDomainInImage.java
@Test
  public void testDomainInImageUsingWlstWithSslEnabled() throws Exception {
    Assumptions.assumeTrue(FULLTEST);
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);

    LoggerHelper.getLocal().log(Level.INFO, "Creating Domain & verifying the domain creation");
    // create domain
    Domain domain = null;
    boolean testCompletedSuccessfully = false;
    try {
      Map<String, Object> domainMap = createDomainInImageMap(
              getNewSuffixCount(), false, testClassName);
      domainMap.put("namespace", domainNS1);
      domainMap.remove("clusterType");

      // domainMap key/value pairs are hard coded in the create domain method call above
      domainMap.put("sslEnabled", Boolean.TRUE);
      domainMap.put("javaOptions",
              "-Dweblogic.StdoutDebugEnabled=false -Dweblogic.security.SSL.ignoreHostnameVerification=true");

      domain = TestUtils.createDomain(domainMap);
      domain.verifyDomainCreated();
      domain.enablePrecreateService();
      List<ExecResult> execResultList = domain.verifySslListeners();
      Assert.assertTrue(execResultList.size() > 0);
      for (ExecResult execResult : execResultList) {
        Assert.assertNotNull(execResult);
        Assert.assertEquals(0, execResult.exitValue());
        Assert.assertTrue(execResult.stderr().contains("HTTP/1.1 200 OK"));
      }

      testCompletedSuccessfully = true;
    } finally {
      if (domain != null && (JENKINS || testCompletedSuccessfully)) {
        TestUtils.deleteWeblogicDomainResources(domain.getDomainUid());
      }
      if (domain != null) {
        domain.deleteImage();
      }
    }
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - " + testMethodName);
  }
/**
   * Creates a WebLogic domain using domain-in-image option. Verifies the domain is started
   * successfully and the SSL listeners in the WebLogic servers are active.
   *
   * @throws Exception If an error occurred
   */
Creates a WebLogic domain using domain-in-image option. Verifies the domain is started
successfully and the SSL listeners in the WebLogic servers are active.

@throws Exception If an error occurred
Creates a WebLogic domain using domain - in - image option . Verifies the domain is started successfully and the SSL listeners in the WebLogic servers are active . @throws Exception If an error occurred
@Test
  public void testDomainInImageUsingWlstWithSslEnabled() throws Exception {
    Assumptions.assumeTrue(FULLTEST);
    String testMethodName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    logTestBegin(testMethodName);
    LoggerHelper.getLocal().log(Level.INFO, "Creating Domain & verifying the domain creation");
    Domain domain = null;
    boolean testCompletedSuccessfully = false;
    try {
      Map<String, Object> domainMap = createDomainInImageMap(
              getNewSuffixCount(), false, testClassName);
      domainMap.put("namespace", domainNS1);
      domainMap.remove("clusterType");
      domainMap.put("sslEnabled", Boolean.TRUE);
      domainMap.put("javaOptions",
              "-Dweblogic.StdoutDebugEnabled=false -Dweblogic.security.SSL.ignoreHostnameVerification=true");
      domain = TestUtils.createDomain(domainMap);
      domain.verifyDomainCreated();
      domain.enablePrecreateService();
      List<ExecResult> execResultList = domain.verifySslListeners();
      Assert.assertTrue(execResultList.size() > 0);
      for (ExecResult execResult : execResultList) {
        Assert.assertNotNull(execResult);
        Assert.assertEquals(0, execResult.exitValue());
        Assert.assertTrue(execResult.stderr().contains("HTTP/1.1 200 OK"));
      }
      testCompletedSuccessfully = true;
    } finally {
      if (domain != null && (JENKINS || testCompletedSuccessfully)) {
        TestUtils.deleteWeblogicDomainResources(domain.getDomainUid());
      }
      if (domain != null) {
        domain.deleteImage();
      }
    }
    LoggerHelper.getLocal().log(Level.INFO, "SUCCESS - " + testMethodName);
  }
@ Test public void testDomainInImageUsingWlstWithSslEnabled ( ) throws Exception { Assumptions . assumeTrue ( FULLTEST ) ; String testMethodName = new Object ( ) { } . getClass ( ) . getEnclosingMethod ( ) . getName ( ) ; logTestBegin ( testMethodName ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Creating Domain & verifying the domain creation" ) ; Domain domain = null ; boolean testCompletedSuccessfully = false ; try { Map < String , Object > domainMap = createDomainInImageMap ( getNewSuffixCount ( ) , false , testClassName ) ; domainMap . put ( "namespace" , domainNS1 ) ; domainMap . remove ( "clusterType" ) ; domainMap . put ( "sslEnabled" , Boolean . TRUE ) ; domainMap . put ( "javaOptions" , "-Dweblogic.StdoutDebugEnabled=false -Dweblogic.security.SSL.ignoreHostnameVerification=true" ) ; domain = TestUtils . createDomain ( domainMap ) ; domain . verifyDomainCreated ( ) ; domain . enablePrecreateService ( ) ; List < ExecResult > execResultList = domain . verifySslListeners ( ) ; Assert . assertTrue ( execResultList . size ( ) > 0 ) ; for ( ExecResult execResult : execResultList ) { Assert . assertNotNull ( execResult ) ; Assert . assertEquals ( 0 , execResult . exitValue ( ) ) ; Assert . assertTrue ( execResult . stderr ( ) . contains ( "HTTP/1.1 200 OK" ) ) ; } testCompletedSuccessfully = true ; } finally { if ( domain != null && ( JENKINS || testCompletedSuccessfully ) ) { TestUtils . deleteWeblogicDomainResources ( domain . getDomainUid ( ) ) ; } if ( domain != null ) { domain . deleteImage ( ) ; } } LoggerHelper . getLocal ( ) . log ( Level . INFO , "SUCCESS - " + testMethodName ) ; }
Creates a WebLogic domain using domain-in-image option.
Creates a WebLogic domain using domain - in - image option .
// create domain // domainMap key/value pairs are hard coded in the create domain method call above