integration-tests/src/test/java/oracle/kubernetes/operator/ItMultipleClusters.java
@BeforeEach
  public void prepare() throws Exception {
    if (FULLTEST) {
      createResultAndPvDirs(testClassName);
      // create operator1
      if (operator1 == null) {
        String template =
            BaseTest.getProjectRoot() + "/kubernetes/samples/scripts/common/domain-template.yaml";
        String add =
            "  - clusterName: %CLUSTER_NAME%-2\n"
                + "    serverStartState: \"RUNNING\"\n"
                + "    replicas: %INITIAL_MANAGED_SERVER_REPLICAS%\n";
        customDomainTemplate = getResultDir() + "/customDomainTemplate.yaml";
        Files.copy(
            Paths.get(template),
            Paths.get(customDomainTemplate),
            StandardCopyOption.REPLACE_EXISTING);
        Files.write(Paths.get(customDomainTemplate), add.getBytes(), StandardOpenOption.APPEND);

        Map<String, Object> operatorMap =
            createOperatorMap(getNewSuffixCount(), true, testClassName);
        operator1 = TestUtils.createOperator(operatorMap, Operator.RestCertType.SELF_SIGNED);
        Assertions.assertNotNull(operator1);
        domainNS1 = ((ArrayList<String>) operatorMap.get("domainNamespaces")).get(0);
        namespaceList.append((String)operatorMap.get("namespace"));
        namespaceList.append(" ").append(domainNS1);
      }

    }
  }
/**
   * 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);
      if (operator1 == null) {
        String template =
            BaseTest.getProjectRoot() + "/kubernetes/samples/scripts/common/domain-template.yaml";
        String add =
            "  - clusterName: %CLUSTER_NAME%-2\n"
                + "    serverStartState: \"RUNNING\"\n"
                + "    replicas: %INITIAL_MANAGED_SERVER_REPLICAS%\n";
        customDomainTemplate = getResultDir() + "/customDomainTemplate.yaml";
        Files.copy(
            Paths.get(template),
            Paths.get(customDomainTemplate),
            StandardCopyOption.REPLACE_EXISTING);
        Files.write(Paths.get(customDomainTemplate), add.getBytes(), StandardOpenOption.APPEND);
        Map<String, Object> operatorMap =
            createOperatorMap(getNewSuffixCount(), true, testClassName);
        operator1 = TestUtils.createOperator(operatorMap, Operator.RestCertType.SELF_SIGNED);
        Assertions.assertNotNull(operator1);
        domainNS1 = ((ArrayList<String>) operatorMap.get("domainNamespaces")).get(0);
        namespaceList.append((String)operatorMap.get("namespace"));
        namespaceList.append(" ").append(domainNS1);
      }
    }
  }
@ BeforeEach public void prepare ( ) throws Exception { if ( FULLTEST ) { createResultAndPvDirs ( testClassName ) ; if ( operator1 == null ) { String template = BaseTest . getProjectRoot ( ) + "/kubernetes/samples/scripts/common/domain-template.yaml" ; String add = "  - clusterName: %CLUSTER_NAME%-2\n" + "    serverStartState: \"RUNNING\"\n" + "    replicas: %INITIAL_MANAGED_SERVER_REPLICAS%\n" ; customDomainTemplate = getResultDir ( ) + "/customDomainTemplate.yaml" ; Files . copy ( Paths . get ( template ) , Paths . get ( customDomainTemplate ) , StandardCopyOption . REPLACE_EXISTING ) ; Files . write ( Paths . get ( customDomainTemplate ) , add . getBytes ( ) , StandardOpenOption . APPEND ) ; Map < String , Object > operatorMap = createOperatorMap ( getNewSuffixCount ( ) , true , testClassName ) ; operator1 = TestUtils . createOperator ( operatorMap , Operator . RestCertType . SELF_SIGNED ) ; Assertions . assertNotNull ( operator1 ) ; domainNS1 = ( ( ArrayList < String > ) operatorMap . get ( "domainNamespaces" ) ) . get ( 0 ) ; namespaceList . append ( ( String ) operatorMap . get ( "namespace" ) ) ; namespaceList . append ( " " ) . append ( domainNS1 ) ; } } }
This method gets called before every test.
This method gets called before every test .
// create operator1