integration-tests/src/test/java/oracle/kubernetes/operator/BaseTest.java
public static void initialize(String appPropsFile, String testClassName)
      throws Exception {
    testClassName = testClassName;
    LoggerHelper.initLocal(Logger.getLogger(testClassName));
    LoggerHelper.getGlobal().log(Level.INFO, "Starting testClass " + testClassName);
    LoggerHelper.getLocal().log(Level.INFO, "Starting testClass " + testClassName);

    // load app props defined
    appProps = TestUtils.loadProps(appPropsFile);

    // check app props
    String baseDir = appProps.getProperty("baseDir");
    if (baseDir == null) {
      throw new IllegalArgumentException("FAILURE: baseDir is not set");
    }
    username = appProps.getProperty("username", username);
    password = appProps.getProperty("password", password);
    weblogicImageTag =
        System.getenv("IMAGE_TAG_WEBLOGIC") != null
            ? System.getenv("IMAGE_TAG_WEBLOGIC")
            : appProps.getProperty("weblogicImageTag");
    weblogicImageDevTag =
        System.getenv("IMAGE_DEVTAG_WEBLOGIC") != null
            ? System.getenv("IMAGE_DEVTAG_WEBLOGIC")
            : appProps.getProperty("weblogicImageDevTag");
    weblogicImageName =
        System.getenv("IMAGE_NAME_WEBLOGIC") != null
            ? System.getenv("IMAGE_NAME_WEBLOGIC")
            : appProps.getProperty("weblogicImageName");
    weblogicImageServer =
        System.getenv("OCR_SERVER") != null
            ? System.getenv("OCR_SERVER")
            : appProps.getProperty("OCR_SERVER");
    fmwImageTag =
        System.getenv("IMAGE_TAG_FMWINFRA") != null
            ? System.getenv("IMAGE_TAG_FMWINFRA")
            : appProps.getProperty("fmwImageTag");
    fmwImageName =
        System.getenv("IMAGE_NAME_FMWINFRA") != null
            ? System.getenv("IMAGE_NAME_FMWINFRA")
            : appProps.getProperty("fmwImageName");
    oracledbImageTag =
        System.getenv("IMAGE_TAG_ORACLEDB") != null
            ? System.getenv("IMAGE_TAG_ORACLEDB")
            : appProps.getProperty("oracledbImageTag");
    oracledbImageName =
        System.getenv("IMAGE_NAME_ORACLEDB") != null
            ? System.getenv("IMAGE_NAME_ORACLEDB")
            : appProps.getProperty("oracledbImageName");
    domainApiVersion =
        System.getenv("DOMAIN_API_VERSION") != null
            ? System.getenv("DOMAIN_API_VERSION")
            : appProps.getProperty("DOMAIN_API_VERSION");
    crdVersion =
        System.getenv("CRD_VERSION") != null
            ? System.getenv("CRD_VERSION")
            : appProps.getProperty("CRD_VERSION");
    WDT_VERSION =
        System.getenv("WDT_VERSION") != null
            ? System.getenv("WDT_VERSION")
            : appProps.getProperty("WDT_VERSION");
    PROMETHEUS_CHART_VERSION =
        System.getenv("PROMETHEUS_CHART_VERSION") != null
            ? System.getenv("PROMETHEUS_CHART_VERSION")
            : appProps.getProperty("PROMETHEUS_CHART_VERSION");
    GRAFANA_CHART_VERSION =
        System.getenv("GRAFANA_CHART_VERSION") != null
            ? System.getenv("GRAFANA_CHART_VERSION")
            : appProps.getProperty("GRAFANA_CHART_VERSION");
    MONITORING_EXPORTER_VERSION =
        System.getenv("MONITORING_EXPORTER_VERSION") != null
            ? System.getenv("MONITORING_EXPORTER_VERSION")
            : appProps.getProperty("MONITORING_EXPORTER_VERSION");

    MONITORING_EXPORTER_BRANCH =
        System.getenv("MONITORING_EXPORTER_BRANCH") != null
            ? System.getenv("MONITORING_EXPORTER_BRANCH")
            : appProps.getProperty("MONITORING_EXPORTER_BRANCH", "master");

    maxIterationsPod =
        Integer.parseInt(System.getenv("MAX_ITERATIONS") != null
            ? System.getenv("MAX_ITERATIONS")
            : appProps.getProperty("maxIterationsPod", "" + maxIterationsPod));

    waitTimePod =
        Integer.parseInt(System.getenv("WAIT_TIME_SECONDS") != null
            ? System.getenv("WAIT_TIME_SECONDS")
            : appProps.getProperty("waitTimePod", "" + waitTimePod));

    if (System.getenv("RESULT_ROOT") != null) {
      resultRootCommon = System.getenv("RESULT_ROOT");
    } else {
      resultRootCommon = baseDir + "/" + System.getProperty("user.name")
          + "/wl_k8s_test_results";
    }

    if (System.getenv("PV_ROOT") != null) {
      pvRootCommon = System.getenv("PV_ROOT");
    } else {
      pvRootCommon = resultRootCommon;
    }

    if (System.getenv("LEASE_ID") != null) {
      leaseId = System.getenv("LEASE_ID");
    }

    projectRoot = System.getProperty("user.dir") + "/..";

    // BRANCH_NAME var is used in Jenkins job
    if (System.getenv("BRANCH_NAME") != null) {
      branchName = System.getenv("BRANCH_NAME");
    } else {
      branchName = TestUtils.getGitBranchName();
    }
    appLocationOnHost = getProjectRoot() + "/integration-tests/src/test/resources/apps";

  }
/**
   * initializes the application properties and creates directories for results.
   *
   * @param appPropsFile  application properties file
   * @param testClassName test class name
   * @throws Exception exception
   */
initializes the application properties and creates directories for results.
@param appPropsFile  application properties file
@param testClassName test class name
@throws Exception exception
initializes the application properties and creates directories for results . @param appPropsFile application properties file @param testClassName test class name @throws Exception exception
public static void initialize(String appPropsFile, String testClassName)
      throws Exception {
    testClassName = testClassName;
    LoggerHelper.initLocal(Logger.getLogger(testClassName));
    LoggerHelper.getGlobal().log(Level.INFO, "Starting testClass " + testClassName);
    LoggerHelper.getLocal().log(Level.INFO, "Starting testClass " + testClassName);
    appProps = TestUtils.loadProps(appPropsFile);
    String baseDir = appProps.getProperty("baseDir");
    if (baseDir == null) {
      throw new IllegalArgumentException("FAILURE: baseDir is not set");
    }
    username = appProps.getProperty("username", username);
    password = appProps.getProperty("password", password);
    weblogicImageTag =
        System.getenv("IMAGE_TAG_WEBLOGIC") != null
            ? System.getenv("IMAGE_TAG_WEBLOGIC")
            : appProps.getProperty("weblogicImageTag");
    weblogicImageDevTag =
        System.getenv("IMAGE_DEVTAG_WEBLOGIC") != null
            ? System.getenv("IMAGE_DEVTAG_WEBLOGIC")
            : appProps.getProperty("weblogicImageDevTag");
    weblogicImageName =
        System.getenv("IMAGE_NAME_WEBLOGIC") != null
            ? System.getenv("IMAGE_NAME_WEBLOGIC")
            : appProps.getProperty("weblogicImageName");
    weblogicImageServer =
        System.getenv("OCR_SERVER") != null
            ? System.getenv("OCR_SERVER")
            : appProps.getProperty("OCR_SERVER");
    fmwImageTag =
        System.getenv("IMAGE_TAG_FMWINFRA") != null
            ? System.getenv("IMAGE_TAG_FMWINFRA")
            : appProps.getProperty("fmwImageTag");
    fmwImageName =
        System.getenv("IMAGE_NAME_FMWINFRA") != null
            ? System.getenv("IMAGE_NAME_FMWINFRA")
            : appProps.getProperty("fmwImageName");
    oracledbImageTag =
        System.getenv("IMAGE_TAG_ORACLEDB") != null
            ? System.getenv("IMAGE_TAG_ORACLEDB")
            : appProps.getProperty("oracledbImageTag");
    oracledbImageName =
        System.getenv("IMAGE_NAME_ORACLEDB") != null
            ? System.getenv("IMAGE_NAME_ORACLEDB")
            : appProps.getProperty("oracledbImageName");
    domainApiVersion =
        System.getenv("DOMAIN_API_VERSION") != null
            ? System.getenv("DOMAIN_API_VERSION")
            : appProps.getProperty("DOMAIN_API_VERSION");
    crdVersion =
        System.getenv("CRD_VERSION") != null
            ? System.getenv("CRD_VERSION")
            : appProps.getProperty("CRD_VERSION");
    WDT_VERSION =
        System.getenv("WDT_VERSION") != null
            ? System.getenv("WDT_VERSION")
            : appProps.getProperty("WDT_VERSION");
    PROMETHEUS_CHART_VERSION =
        System.getenv("PROMETHEUS_CHART_VERSION") != null
            ? System.getenv("PROMETHEUS_CHART_VERSION")
            : appProps.getProperty("PROMETHEUS_CHART_VERSION");
    GRAFANA_CHART_VERSION =
        System.getenv("GRAFANA_CHART_VERSION") != null
            ? System.getenv("GRAFANA_CHART_VERSION")
            : appProps.getProperty("GRAFANA_CHART_VERSION");
    MONITORING_EXPORTER_VERSION =
        System.getenv("MONITORING_EXPORTER_VERSION") != null
            ? System.getenv("MONITORING_EXPORTER_VERSION")
            : appProps.getProperty("MONITORING_EXPORTER_VERSION");
    MONITORING_EXPORTER_BRANCH =
        System.getenv("MONITORING_EXPORTER_BRANCH") != null
            ? System.getenv("MONITORING_EXPORTER_BRANCH")
            : appProps.getProperty("MONITORING_EXPORTER_BRANCH", "master");
    maxIterationsPod =
        Integer.parseInt(System.getenv("MAX_ITERATIONS") != null
            ? System.getenv("MAX_ITERATIONS")
            : appProps.getProperty("maxIterationsPod", "" + maxIterationsPod));
    waitTimePod =
        Integer.parseInt(System.getenv("WAIT_TIME_SECONDS") != null
            ? System.getenv("WAIT_TIME_SECONDS")
            : appProps.getProperty("waitTimePod", "" + waitTimePod));
    if (System.getenv("RESULT_ROOT") != null) {
      resultRootCommon = System.getenv("RESULT_ROOT");
    } else {
      resultRootCommon = baseDir + "/" + System.getProperty("user.name")
          + "/wl_k8s_test_results";
    }
    if (System.getenv("PV_ROOT") != null) {
      pvRootCommon = System.getenv("PV_ROOT");
    } else {
      pvRootCommon = resultRootCommon;
    }
    if (System.getenv("LEASE_ID") != null) {
      leaseId = System.getenv("LEASE_ID");
    }
    projectRoot = System.getProperty("user.dir") + "/..";
    if (System.getenv("BRANCH_NAME") != null) {
      branchName = System.getenv("BRANCH_NAME");
    } else {
      branchName = TestUtils.getGitBranchName();
    }
    appLocationOnHost = getProjectRoot() + "/integration-tests/src/test/resources/apps";
  }
public static void initialize ( String appPropsFile , String testClassName ) throws Exception { testClassName = testClassName ; LoggerHelper . initLocal ( Logger . getLogger ( testClassName ) ) ; LoggerHelper . getGlobal ( ) . log ( Level . INFO , "Starting testClass " + testClassName ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Starting testClass " + testClassName ) ; appProps = TestUtils . loadProps ( appPropsFile ) ; String baseDir = appProps . getProperty ( "baseDir" ) ; if ( baseDir == null ) { throw new IllegalArgumentException ( "FAILURE: baseDir is not set" ) ; } username = appProps . getProperty ( "username" , username ) ; password = appProps . getProperty ( "password" , password ) ; weblogicImageTag = System . getenv ( "IMAGE_TAG_WEBLOGIC" ) != null ? System . getenv ( "IMAGE_TAG_WEBLOGIC" ) : appProps . getProperty ( "weblogicImageTag" ) ; weblogicImageDevTag = System . getenv ( "IMAGE_DEVTAG_WEBLOGIC" ) != null ? System . getenv ( "IMAGE_DEVTAG_WEBLOGIC" ) : appProps . getProperty ( "weblogicImageDevTag" ) ; weblogicImageName = System . getenv ( "IMAGE_NAME_WEBLOGIC" ) != null ? System . getenv ( "IMAGE_NAME_WEBLOGIC" ) : appProps . getProperty ( "weblogicImageName" ) ; weblogicImageServer = System . getenv ( "OCR_SERVER" ) != null ? System . getenv ( "OCR_SERVER" ) : appProps . getProperty ( "OCR_SERVER" ) ; fmwImageTag = System . getenv ( "IMAGE_TAG_FMWINFRA" ) != null ? System . getenv ( "IMAGE_TAG_FMWINFRA" ) : appProps . getProperty ( "fmwImageTag" ) ; fmwImageName = System . getenv ( "IMAGE_NAME_FMWINFRA" ) != null ? System . getenv ( "IMAGE_NAME_FMWINFRA" ) : appProps . getProperty ( "fmwImageName" ) ; oracledbImageTag = System . getenv ( "IMAGE_TAG_ORACLEDB" ) != null ? System . getenv ( "IMAGE_TAG_ORACLEDB" ) : appProps . getProperty ( "oracledbImageTag" ) ; oracledbImageName = System . getenv ( "IMAGE_NAME_ORACLEDB" ) != null ? System . getenv ( "IMAGE_NAME_ORACLEDB" ) : appProps . getProperty ( "oracledbImageName" ) ; domainApiVersion = System . getenv ( "DOMAIN_API_VERSION" ) != null ? System . getenv ( "DOMAIN_API_VERSION" ) : appProps . getProperty ( "DOMAIN_API_VERSION" ) ; crdVersion = System . getenv ( "CRD_VERSION" ) != null ? System . getenv ( "CRD_VERSION" ) : appProps . getProperty ( "CRD_VERSION" ) ; WDT_VERSION = System . getenv ( "WDT_VERSION" ) != null ? System . getenv ( "WDT_VERSION" ) : appProps . getProperty ( "WDT_VERSION" ) ; PROMETHEUS_CHART_VERSION = System . getenv ( "PROMETHEUS_CHART_VERSION" ) != null ? System . getenv ( "PROMETHEUS_CHART_VERSION" ) : appProps . getProperty ( "PROMETHEUS_CHART_VERSION" ) ; GRAFANA_CHART_VERSION = System . getenv ( "GRAFANA_CHART_VERSION" ) != null ? System . getenv ( "GRAFANA_CHART_VERSION" ) : appProps . getProperty ( "GRAFANA_CHART_VERSION" ) ; MONITORING_EXPORTER_VERSION = System . getenv ( "MONITORING_EXPORTER_VERSION" ) != null ? System . getenv ( "MONITORING_EXPORTER_VERSION" ) : appProps . getProperty ( "MONITORING_EXPORTER_VERSION" ) ; MONITORING_EXPORTER_BRANCH = System . getenv ( "MONITORING_EXPORTER_BRANCH" ) != null ? System . getenv ( "MONITORING_EXPORTER_BRANCH" ) : appProps . getProperty ( "MONITORING_EXPORTER_BRANCH" , "master" ) ; maxIterationsPod = Integer . parseInt ( System . getenv ( "MAX_ITERATIONS" ) != null ? System . getenv ( "MAX_ITERATIONS" ) : appProps . getProperty ( "maxIterationsPod" , "" + maxIterationsPod ) ) ; waitTimePod = Integer . parseInt ( System . getenv ( "WAIT_TIME_SECONDS" ) != null ? System . getenv ( "WAIT_TIME_SECONDS" ) : appProps . getProperty ( "waitTimePod" , "" + waitTimePod ) ) ; if ( System . getenv ( "RESULT_ROOT" ) != null ) { resultRootCommon = System . getenv ( "RESULT_ROOT" ) ; } else { resultRootCommon = baseDir + "/" + System . getProperty ( "user.name" ) + "/wl_k8s_test_results" ; } if ( System . getenv ( "PV_ROOT" ) != null ) { pvRootCommon = System . getenv ( "PV_ROOT" ) ; } else { pvRootCommon = resultRootCommon ; } if ( System . getenv ( "LEASE_ID" ) != null ) { leaseId = System . getenv ( "LEASE_ID" ) ; } projectRoot = System . getProperty ( "user.dir" ) + "/.." ; if ( System . getenv ( "BRANCH_NAME" ) != null ) { branchName = System . getenv ( "BRANCH_NAME" ) ; } else { branchName = TestUtils . getGitBranchName ( ) ; } appLocationOnHost = getProjectRoot ( ) + "/integration-tests/src/test/resources/apps" ; }
initializes the application properties and creates directories for results.
initializes the application properties and creates directories for results .
// load app props defined // check app props // BRANCH_NAME var is used in Jenkins job