integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java
public static void createRbacPoliciesForWldfScaling() throws Exception {
    // create rbac policies
    StringBuffer cmd = new StringBuffer("kubectl apply -f ");
    cmd.append(BaseTest.getProjectRoot())
        .append("/integration-tests/src/test/resources/wldf/wldf-policy.yaml");
    LoggerHelper.getLocal().log(Level.INFO, "Running " + cmd);

    ExecResult result = ExecCommand.exec(cmd.toString());
    if (result.exitValue() != 0) {
      throw new RuntimeException(
          "FAILURE: command "
              + cmd
              + " failed, returned "
              + result.stdout()
              + "\n"
              + result.stderr());
    }
    String outputStr = result.stdout().trim();
    LoggerHelper.getLocal().log(Level.INFO, "Command returned " + outputStr);
  }
/**
   * Create RBAC for scaling.
   * @throws Exception on failure
   */
Create RBAC for scaling.
@throws Exception on failure
Create RBAC for scaling . @throws Exception on failure
public static void createRbacPoliciesForWldfScaling() throws Exception {
    StringBuffer cmd = new StringBuffer("kubectl apply -f ");
    cmd.append(BaseTest.getProjectRoot())
        .append("/integration-tests/src/test/resources/wldf/wldf-policy.yaml");
    LoggerHelper.getLocal().log(Level.INFO, "Running " + cmd);
    ExecResult result = ExecCommand.exec(cmd.toString());
    if (result.exitValue() != 0) {
      throw new RuntimeException(
          "FAILURE: command "
              + cmd
              + " failed, returned "
              + result.stdout()
              + "\n"
              + result.stderr());
    }
    String outputStr = result.stdout().trim();
    LoggerHelper.getLocal().log(Level.INFO, "Command returned " + outputStr);
  }
public static void createRbacPoliciesForWldfScaling ( ) throws Exception { StringBuffer cmd = new StringBuffer ( "kubectl apply -f " ) ; cmd . append ( BaseTest . getProjectRoot ( ) ) . append ( "/integration-tests/src/test/resources/wldf/wldf-policy.yaml" ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Running " + cmd ) ; ExecResult result = ExecCommand . exec ( cmd . toString ( ) ) ; if ( result . exitValue ( ) != 0 ) { throw new RuntimeException ( "FAILURE: command " + cmd + " failed, returned " + result . stdout ( ) + "\n" + result . stderr ( ) ) ; } String outputStr = result . stdout ( ) . trim ( ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Command returned " + outputStr ) ; }
Create RBAC for scaling.
Create RBAC for scaling .
// create rbac policies