integration-tests/src/test/java/oracle/kubernetes/operator/utils/DbUtils.java
public static void startOracleDB(String scriptsDir, String dbPort, 
      String dbNamespace) throws Exception {
    String cmd1 = "sh "
        + scriptsDir
        + "/scripts/create-oracle-db-service/start-db-service.sh"
        + " -i " + BaseTest.getOracledbImageName() + ":" + BaseTest.getOracledbImageTag()
        + " -p " + dbPort
        + " -n " + dbNamespace;
    
    TestUtils.execOrAbortProcess(cmd1, true);
    String cmd2 = "kubectl get pod -n " 
        + dbNamespace 
        + " -o jsonpath=\"{.items[0].metadata.name}\"";
    logger.info("DEBUG: command to get DB pod: " + cmd2);
    ExecResult result = TestUtils.execOrAbortProcess(cmd2, true);
    String podName = result.stdout();

    logger.info("DEBUG: DB podname=" + podName + " namespace: " + dbNamespace);
    TestUtils.checkPodReady(podName, dbNamespace);

    // check the db is ready to use
    String cmd3 = "kubectl logs " + podName + " -n " + dbNamespace;
    TestUtils.checkCmdInLoop(cmd3, "The database is ready for use", podName);
  }
/**
   * Start Oracle DB pod and service in the specified namespace.
   * 
   * @param scriptsDir directory of scripts
   * @param dbPort NodePort of DB
   * @param dbNamespace namespace where DB instance is going to start
   * @throws Exception if any error occurs when creating Oracle DB pod and service
   */
Start Oracle DB pod and service in the specified namespace.

@param scriptsDir directory of scripts
@param dbPort NodePort of DB
@param dbNamespace namespace where DB instance is going to start
@throws Exception if any error occurs when creating Oracle DB pod and service
Start Oracle DB pod and service in the specified namespace . @param scriptsDir directory of scripts @param dbPort NodePort of DB @param dbNamespace namespace where DB instance is going to start @throws Exception if any error occurs when creating Oracle DB pod and service
public static void startOracleDB(String scriptsDir, String dbPort, 
      String dbNamespace) throws Exception {
    String cmd1 = "sh "
        + scriptsDir
        + "/scripts/create-oracle-db-service/start-db-service.sh"
        + " -i " + BaseTest.getOracledbImageName() + ":" + BaseTest.getOracledbImageTag()
        + " -p " + dbPort
        + " -n " + dbNamespace;
    TestUtils.execOrAbortProcess(cmd1, true);
    String cmd2 = "kubectl get pod -n " 
        + dbNamespace 
        + " -o jsonpath=\"{.items[0].metadata.name}\"";
    logger.info("DEBUG: command to get DB pod: " + cmd2);
    ExecResult result = TestUtils.execOrAbortProcess(cmd2, true);
    String podName = result.stdout();
    logger.info("DEBUG: DB podname=" + podName + " namespace: " + dbNamespace);
    TestUtils.checkPodReady(podName, dbNamespace);
    String cmd3 = "kubectl logs " + podName + " -n " + dbNamespace;
    TestUtils.checkCmdInLoop(cmd3, "The database is ready for use", podName);
  }
public static void startOracleDB ( String scriptsDir , String dbPort , String dbNamespace ) throws Exception { String cmd1 = "sh " + scriptsDir + "/scripts/create-oracle-db-service/start-db-service.sh" + " -i " + BaseTest . getOracledbImageName ( ) + ":" + BaseTest . getOracledbImageTag ( ) + " -p " + dbPort + " -n " + dbNamespace ; TestUtils . execOrAbortProcess ( cmd1 , true ) ; String cmd2 = "kubectl get pod -n " + dbNamespace + " -o jsonpath=\"{.items[0].metadata.name}\"" ; logger . info ( "DEBUG: command to get DB pod: " + cmd2 ) ; ExecResult result = TestUtils . execOrAbortProcess ( cmd2 , true ) ; String podName = result . stdout ( ) ; logger . info ( "DEBUG: DB podname=" + podName + " namespace: " + dbNamespace ) ; TestUtils . checkPodReady ( podName , dbNamespace ) ; String cmd3 = "kubectl logs " + podName + " -n " + dbNamespace ; TestUtils . checkCmdInLoop ( cmd3 , "The database is ready for use" , podName ) ; }
Start Oracle DB pod and service in the specified namespace.
Start Oracle DB pod and service in the specified namespace .
// check the db is ready to use