integration-tests/src/test/java/oracle/kubernetes/operator/ItSessionMigration.java
@BeforeEach
  public void prepare() throws Exception {
    if (FULLTEST) {
      createResultAndPvDirs(testClassName);
      String testClassNameShort = "sessmig";
      // create operator1
      if (operator == null) {
        Map<String, Object> operatorMap =
            createOperatorMap(getNewSuffixCount(), true, testClassNameShort);
        operator = TestUtils.createOperator(operatorMap, Operator.RestCertType.SELF_SIGNED);
        Assertions.assertNotNull(operator);
        domainNS1 = ((ArrayList<String>) operatorMap.get("domainNamespaces")).get(0);
        namespaceList.append((String)operatorMap.get("namespace"));
        namespaceList.append(" ").append(domainNS1);
      }

      // create domain
      if (domain == null) {
        LoggerHelper.getLocal().log(Level.INFO,
            "Creating WLS Domain & waiting for the script to complete execution");
        Map<String, Object> wlstDomainMap =
            createDomainMap(getNewSuffixCount(), testClassNameShort);
        wlstDomainMap.put("namespace", domainNS1);
        // wlstDomainMap.put("domainUID", "sessmigdomainonpvwlst");
        domain = TestUtils.createDomain(wlstDomainMap);
        domain.verifyDomainCreated();
      }

      httpHeaderFile = getResultDir() + "/headers";
      httpAttrMap = new HashMap<String, String>();
      httpAttrMap.put("sessioncreatetime", "(.*)sessioncreatetime>(.*)</sessioncreatetime(.*)");
      httpAttrMap.put("sessionid", "(.*)sessionid>(.*)</sessionid(.*)");
      httpAttrMap.put("primary", "(.*)primary>(.*)</primary(.*)");
      httpAttrMap.put("secondary", "(.*)secondary>(.*)</secondary(.*)");
      httpAttrMap.put("count", "(.*)countattribute>(.*)</countattribute(.*)");

      // Build WAR in the admin pod and deploy it from the admin pod to a weblogic target
      domain.buildDeployJavaAppInPod(
          testAppName, scriptName, BaseTest.getUsername(), BaseTest.getPassword());

      // Wait some time for deployment gets ready
      Thread.sleep(10 * 1000);
    }

  }
/**
   * This method gets called before every test. It creates the result/pv root directories
   * for the test. Creates the operator and domain if its not running.
   *
   * @throws Exception exception if result/pv/operator/domain creation fails
   */
This method gets called before every test. It creates the result/pv root directories
for the test. Creates the operator and domain if its not running.

@throws Exception exception if result/pv/operator/domain creation fails
This method gets called before every test . It creates the result / pv root directories for the test . Creates the operator and domain if its not running . @throws Exception exception if result / pv / operator / domain creation fails
@BeforeEach
  public void prepare() throws Exception {
    if (FULLTEST) {
      createResultAndPvDirs(testClassName);
      String testClassNameShort = "sessmig";
      if (operator == null) {
        Map<String, Object> operatorMap =
            createOperatorMap(getNewSuffixCount(), true, testClassNameShort);
        operator = TestUtils.createOperator(operatorMap, Operator.RestCertType.SELF_SIGNED);
        Assertions.assertNotNull(operator);
        domainNS1 = ((ArrayList<String>) operatorMap.get("domainNamespaces")).get(0);
        namespaceList.append((String)operatorMap.get("namespace"));
        namespaceList.append(" ").append(domainNS1);
      }
      if (domain == null) {
        LoggerHelper.getLocal().log(Level.INFO,
            "Creating WLS Domain & waiting for the script to complete execution");
        Map<String, Object> wlstDomainMap =
            createDomainMap(getNewSuffixCount(), testClassNameShort);
        wlstDomainMap.put("namespace", domainNS1);
        domain = TestUtils.createDomain(wlstDomainMap);
        domain.verifyDomainCreated();
      }
      httpHeaderFile = getResultDir() + "/headers";
      httpAttrMap = new HashMap<String, String>();
      httpAttrMap.put("sessioncreatetime", "(.*)sessioncreatetime>(.*)</sessioncreatetime(.*)");
      httpAttrMap.put("sessionid", "(.*)sessionid>(.*)</sessionid(.*)");
      httpAttrMap.put("primary", "(.*)primary>(.*)</primary(.*)");
      httpAttrMap.put("secondary", "(.*)secondary>(.*)</secondary(.*)");
      httpAttrMap.put("count", "(.*)countattribute>(.*)</countattribute(.*)");
      domain.buildDeployJavaAppInPod(
          testAppName, scriptName, BaseTest.getUsername(), BaseTest.getPassword());
      Thread.sleep(10 * 1000);
    }
  }
@ BeforeEach public void prepare ( ) throws Exception { if ( FULLTEST ) { createResultAndPvDirs ( testClassName ) ; String testClassNameShort = "sessmig" ; if ( operator == null ) { Map < String , Object > operatorMap = createOperatorMap ( getNewSuffixCount ( ) , true , testClassNameShort ) ; operator = TestUtils . createOperator ( operatorMap , Operator . RestCertType . SELF_SIGNED ) ; Assertions . assertNotNull ( operator ) ; domainNS1 = ( ( ArrayList < String > ) operatorMap . get ( "domainNamespaces" ) ) . get ( 0 ) ; namespaceList . append ( ( String ) operatorMap . get ( "namespace" ) ) ; namespaceList . append ( " " ) . append ( domainNS1 ) ; } if ( domain == null ) { LoggerHelper . getLocal ( ) . log ( Level . INFO , "Creating WLS Domain & waiting for the script to complete execution" ) ; Map < String , Object > wlstDomainMap = createDomainMap ( getNewSuffixCount ( ) , testClassNameShort ) ; wlstDomainMap . put ( "namespace" , domainNS1 ) ; domain = TestUtils . createDomain ( wlstDomainMap ) ; domain . verifyDomainCreated ( ) ; } httpHeaderFile = getResultDir ( ) + "/headers" ; httpAttrMap = new HashMap < String , String > ( ) ; httpAttrMap . put ( "sessioncreatetime" , "(.*)sessioncreatetime>(.*)</sessioncreatetime(.*)" ) ; httpAttrMap . put ( "sessionid" , "(.*)sessionid>(.*)</sessionid(.*)" ) ; httpAttrMap . put ( "primary" , "(.*)primary>(.*)</primary(.*)" ) ; httpAttrMap . put ( "secondary" , "(.*)secondary>(.*)</secondary(.*)" ) ; httpAttrMap . put ( "count" , "(.*)countattribute>(.*)</countattribute(.*)" ) ; domain . buildDeployJavaAppInPod ( testAppName , scriptName , BaseTest . getUsername ( ) , BaseTest . getPassword ( ) ) ; Thread . sleep ( 10 * 1000 ) ; } }
This method gets called before every test.
This method gets called before every test .
// create operator1 // create domain // wlstDomainMap.put("domainUID", "sessmigdomainonpvwlst"); // Build WAR in the admin pod and deploy it from the admin pod to a weblogic target // Wait some time for deployment gets ready