integration-tests/src/test/java/oracle/kubernetes/operator/ItMonitoringExporter.java
private static void deletePvDir() throws Exception {
    String pvDir = monitoringExporterEndToEndDir + "/pvDir";
    String crdCmd =
        "cd "
            + monitoringExporterEndToEndDir
            + " && docker run --rm -v "
            + monitoringExporterEndToEndDir
            + "pvDir:/tt -v $PWD/util:/util  nginx  /util/clean-pv.sh";
    try {
      if (new File(pvDir).exists()) {
        ExecCommand.exec(crdCmd);
        StringBuffer removeDir = new StringBuffer();
        LoggerHelper.getLocal().log(Level.INFO, "Cleaning PV dir " + pvDir);
        removeDir.append("rm -rf ").append(pvDir);
        ExecCommand.exec(removeDir.toString());
      }
    } finally {
      if (JENKINS) {
        if (new File(pvDir).exists()) {

          LoggerHelper.getLocal().log(Level.INFO, "Deleting pv created dir " + pvDir);
          TestUtils.execOrAbortProcess("/usr/local/packages/aime/ias/run_as_root \"rm -rf " + pvDir + "\"");
        }
      }
    }
  }
/**
   * Delete PvDir via docker.
   *
   * @throws Exception if could not run the command successfully to delete PV
   */
Delete PvDir via docker.
@throws Exception if could not run the command successfully to delete PV
Delete PvDir via docker . @throws Exception if could not run the command successfully to delete PV
private static void deletePvDir() throws Exception {
    String pvDir = monitoringExporterEndToEndDir + "/pvDir";
    String crdCmd =
        "cd "
            + monitoringExporterEndToEndDir
            + " && docker run --rm -v "
            + monitoringExporterEndToEndDir
            + "pvDir:/tt -v $PWD/util:/util  nginx  /util/clean-pv.sh";
    try {
      if (new File(pvDir).exists()) {
        ExecCommand.exec(crdCmd);
        StringBuffer removeDir = new StringBuffer();
        LoggerHelper.getLocal().log(Level.INFO, "Cleaning PV dir " + pvDir);
        removeDir.append("rm -rf ").append(pvDir);
        ExecCommand.exec(removeDir.toString());
      }
    } finally {
      if (JENKINS) {
        if (new File(pvDir).exists()) {
          LoggerHelper.getLocal().log(Level.INFO, "Deleting pv created dir " + pvDir);
          TestUtils.execOrAbortProcess("/usr/local/packages/aime/ias/run_as_root \"rm -rf " + pvDir + "\"");
        }
      }
    }
  }
private static void deletePvDir ( ) throws Exception { String pvDir = monitoringExporterEndToEndDir + "/pvDir" ; String crdCmd = "cd " + monitoringExporterEndToEndDir + " && docker run --rm -v " + monitoringExporterEndToEndDir + "pvDir:/tt -v $PWD/util:/util  nginx  /util/clean-pv.sh" ; try { if ( new File ( pvDir ) . exists ( ) ) { ExecCommand . exec ( crdCmd ) ; StringBuffer removeDir = new StringBuffer ( ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Cleaning PV dir " + pvDir ) ; removeDir . append ( "rm -rf " ) . append ( pvDir ) ; ExecCommand . exec ( removeDir . toString ( ) ) ; } } finally { if ( JENKINS ) { if ( new File ( pvDir ) . exists ( ) ) { LoggerHelper . getLocal ( ) . log ( Level . INFO , "Deleting pv created dir " + pvDir ) ; TestUtils . execOrAbortProcess ( "/usr/local/packages/aime/ias/run_as_root \"rm -rf " + pvDir + "\"" ) ; } } } }
Delete PvDir via docker.
Delete PvDir via docker .