integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java
public static void writePodLog(String logLocation, String podName, String podNS) throws Exception {
    //create dir
    TestUtils.execOrAbortProcess("mkdir -p " + logLocation);

    //write operator pod describe
    String cmd = "kubectl describe pod " + podName + " -n "
        + podNS + " >> " + logLocation
        + "/pod-describe." + podNS + "." + podName;
    ExecCommand.exec(cmd);
    Calendar cal = Calendar.getInstance();

    SimpleDateFormat timeOnly = new SimpleDateFormat("HH.mm.ss");
    String timestamp = timeOnly.format(cal.getTime()).toString();

    //write operator pod logs
    cmd = "kubectl logs pod/" + podName + " -n "
        + podNS + " >> " + logLocation
        + "/pod-log." + podNS + "." + podName + "." + timestamp;
    ExecCommand.exec(cmd);
  }
/**
   * writes pod describe and logs to a file.
   * @param logLocation - location where the logs to be written
   * @param podName - name of the pod
   * @param podNS - namespace of the pod
   */
writes pod describe and logs to a file.
@param logLocation - location where the logs to be written
@param podName - name of the pod
@param podNS - namespace of the pod
writes pod describe and logs to a file . @param logLocation - location where the logs to be written @param podName - name of the pod @param podNS - namespace of the pod
public static void writePodLog(String logLocation, String podName, String podNS) throws Exception {
    TestUtils.execOrAbortProcess("mkdir -p " + logLocation);
    String cmd = "kubectl describe pod " + podName + " -n "
        + podNS + " >> " + logLocation
        + "/pod-describe." + podNS + "." + podName;
    ExecCommand.exec(cmd);
    Calendar cal = Calendar.getInstance();
    SimpleDateFormat timeOnly = new SimpleDateFormat("HH.mm.ss");
    String timestamp = timeOnly.format(cal.getTime()).toString();
    cmd = "kubectl logs pod/" + podName + " -n "
        + podNS + " >> " + logLocation
        + "/pod-log." + podNS + "." + podName + "." + timestamp;
    ExecCommand.exec(cmd);
  }
public static void writePodLog ( String logLocation , String podName , String podNS ) throws Exception { TestUtils . execOrAbortProcess ( "mkdir -p " + logLocation ) ; String cmd = "kubectl describe pod " + podName + " -n " + podNS + " >> " + logLocation + "/pod-describe." + podNS + "." + podName ; ExecCommand . exec ( cmd ) ; Calendar cal = Calendar . getInstance ( ) ; SimpleDateFormat timeOnly = new SimpleDateFormat ( "HH.mm.ss" ) ; String timestamp = timeOnly . format ( cal . getTime ( ) ) . toString ( ) ; cmd = "kubectl logs pod/" + podName + " -n " + podNS + " >> " + logLocation + "/pod-log." + podNS + "." + podName + "." + timestamp ; ExecCommand . exec ( cmd ) ; }
writes pod describe and logs to a file.
writes pod describe and logs to a file .
//create dir //write operator pod describe //write operator pod logs