integration-tests/src/test/java/oracle/kubernetes/operator/ItJrfPvWlst.java
@BeforeEach
  public void prepare() {
    LoggerHelper.getLocal().log(Level.INFO, "Creating result/pv root directories");
    assertDoesNotThrow(() -> createResultAndPvDirs(testClassName),
        "Failed: createResultAndPvDirs");
    
    LoggerHelper.getLocal().log(Level.INFO, "Copying sample dir to the result dir");
    assertDoesNotThrow(() -> TestUtils.execOrAbortProcess(
        "cp -rf " 
         + BaseTest.getProjectRoot() 
         + "/kubernetes/samples/scripts " 
         + getResultDir(),
         true),
         "Failed: Copy sample dir to the result dir");
    
    //start DB and create RCU
    dbrcuNamespace = "dbrcu" + String.valueOf(getNewSuffixCount());
    dbPort = 30011 + getNewSuffixCount();
    dbUrl = "oracle-db." + dbrcuNamespace + ".svc.cluster.local:1521/devpdb.k8s";
    assertDoesNotThrow(() -> DbUtils.setupRcuDatabase(getResultDir(), dbPort, dbUrl, 
        rcuSchemaPrefix, dbrcuNamespace));
        
    // create operator
    if (operator == null) {
      Map<String, Object> operatorMap = createOperatorMap(getNewSuffixCount(),
          true, testClassName);
      operator = assertDoesNotThrow(() -> TestUtils.createOperator(operatorMap, 
          Operator.RestCertType.SELF_SIGNED));
      assertNotNull(operator);
      LoggerHelper.getLocal().log(Level.INFO, "Operator is created for {0}", testClassName);
      
      domainNS = ((ArrayList<String>) operatorMap.get("domainNamespaces")).get(0);
      namespaceList.append((String)operatorMap.get("namespace"));
      namespaceList.append(" ").append(domainNS);
    }
  }
/**
   * This method gets called before every test. It creates the result/pv root directories
   * for the test. It also creates RCU schema, operator.
   */
This method gets called before every test. It creates the result/pv root directories
for the test. It also creates RCU schema, operator.
This method gets called before every test . It creates the result / pv root directories for the test . It also creates RCU schema operator .
@BeforeEach
  public void prepare() {
    LoggerHelper.getLocal().log(Level.INFO, "Creating result/pv root directories");
    assertDoesNotThrow(() -> createResultAndPvDirs(testClassName),
        "Failed: createResultAndPvDirs");
    LoggerHelper.getLocal().log(Level.INFO, "Copying sample dir to the result dir");
    assertDoesNotThrow(() -> TestUtils.execOrAbortProcess(
        "cp -rf " 
         + BaseTest.getProjectRoot() 
         + "/kubernetes/samples/scripts " 
         + getResultDir(),
         true),
         "Failed: Copy sample dir to the result dir");
    dbrcuNamespace = "dbrcu" + String.valueOf(getNewSuffixCount());
    dbPort = 30011 + getNewSuffixCount();
    dbUrl = "oracle-db." + dbrcuNamespace + ".svc.cluster.local:1521/devpdb.k8s";
    assertDoesNotThrow(() -> DbUtils.setupRcuDatabase(getResultDir(), dbPort, dbUrl, 
        rcuSchemaPrefix, dbrcuNamespace));
    if (operator == null) {
      Map<String, Object> operatorMap = createOperatorMap(getNewSuffixCount(),
          true, testClassName);
      operator = assertDoesNotThrow(() -> TestUtils.createOperator(operatorMap, 
          Operator.RestCertType.SELF_SIGNED));
      assertNotNull(operator);
      LoggerHelper.getLocal().log(Level.INFO, "Operator is created for {0}", testClassName);
      domainNS = ((ArrayList<String>) operatorMap.get("domainNamespaces")).get(0);
      namespaceList.append((String)operatorMap.get("namespace"));
      namespaceList.append(" ").append(domainNS);
    }
  }
@ BeforeEach public void prepare ( ) { LoggerHelper . getLocal ( ) . log ( Level . INFO , "Creating result/pv root directories" ) ; assertDoesNotThrow ( ( ) -> createResultAndPvDirs ( testClassName ) , "Failed: createResultAndPvDirs" ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Copying sample dir to the result dir" ) ; assertDoesNotThrow ( ( ) -> TestUtils . execOrAbortProcess ( "cp -rf " + BaseTest . getProjectRoot ( ) + "/kubernetes/samples/scripts " + getResultDir ( ) , true ) , "Failed: Copy sample dir to the result dir" ) ; dbrcuNamespace = "dbrcu" + String . valueOf ( getNewSuffixCount ( ) ) ; dbPort = 30011 + getNewSuffixCount ( ) ; dbUrl = "oracle-db." + dbrcuNamespace + ".svc.cluster.local:1521/devpdb.k8s" ; assertDoesNotThrow ( ( ) -> DbUtils . setupRcuDatabase ( getResultDir ( ) , dbPort , dbUrl , rcuSchemaPrefix , dbrcuNamespace ) ) ; if ( operator == null ) { Map < String , Object > operatorMap = createOperatorMap ( getNewSuffixCount ( ) , true , testClassName ) ; operator = assertDoesNotThrow ( ( ) -> TestUtils . createOperator ( operatorMap , Operator . RestCertType . SELF_SIGNED ) ) ; assertNotNull ( operator ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Operator is created for {0}" , testClassName ) ; domainNS = ( ( ArrayList < String > ) operatorMap . get ( "domainNamespaces" ) ) . get ( 0 ) ; namespaceList . append ( ( String ) operatorMap . get ( "namespace" ) ) ; namespaceList . append ( " " ) . append ( domainNS ) ; } }
This method gets called before every test.
This method gets called before every test .
//start DB and create RCU // create operator