new-integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/CommonTestUtils.java
public static void verifyCredentials(
      String podName,
      String namespace,
      String username,
      String password,
      boolean expectValid) {
    LoggingFacade logger = getLogger();
    String msg = expectValid ? "valid" : "invalid";
    logger.info("Check if the given WebLogic admin credentials are {0}", msg);
    withQuickRetryPolicy
        .conditionEvaluationListener(
            condition -> logger.info("Checking that credentials {0}/{1} are {2}"
                    + "(elapsed time {3}ms, remaining time {4}ms)",
                username,
                password,
                msg,
                condition.getElapsedTimeInMS(),
                condition.getRemainingTimeInMS()))
        .until(assertDoesNotThrow(
            expectValid
                ?
            () -> credentialsValid(K8S_NODEPORT_HOST, podName, namespace, username, password)
                :
            () -> credentialsNotValid(K8S_NODEPORT_HOST, podName, namespace, username, password),
            String.format(
                "Failed to validate credentials %s/%s on pod %s in namespace %s",
                username, password, podName, namespace)));
  }
/**
   * Check that the given credentials are valid to access the WebLogic domain.
   *
   * @param podName name of the admin server pod
   * @param namespace name of the namespace that the pod is running in
   * @param username WebLogic admin username
   * @param password WebLogic admin password
   * @param expectValid true if the check expects a successful result
   */
Check that the given credentials are valid to access the WebLogic domain.
Check that the given credentials are valid to access the WebLogic domain .
public static void verifyCredentials(
      String podName,
      String namespace,
      String username,
      String password,
      boolean expectValid) {
    LoggingFacade logger = getLogger();
    String msg = expectValid ? "valid" : "invalid";
    logger.info("Check if the given WebLogic admin credentials are {0}", msg);
    withQuickRetryPolicy
        .conditionEvaluationListener(
            condition -> logger.info("Checking that credentials {0}/{1} are {2}"
                    + "(elapsed time {3}ms, remaining time {4}ms)",
                username,
                password,
                msg,
                condition.getElapsedTimeInMS(),
                condition.getRemainingTimeInMS()))
        .until(assertDoesNotThrow(
            expectValid
                ?
            () -> credentialsValid(K8S_NODEPORT_HOST, podName, namespace, username, password)
                :
            () -> credentialsNotValid(K8S_NODEPORT_HOST, podName, namespace, username, password),
            String.format(
                "Failed to validate credentials %s/%s on pod %s in namespace %s",
                username, password, podName, namespace)));
  }
public static void verifyCredentials ( String podName , String namespace , String username , String password , boolean expectValid ) { LoggingFacade logger = getLogger ( ) ; String msg = expectValid ? "valid" : "invalid" ; logger . info ( "Check if the given WebLogic admin credentials are {0}" , msg ) ; withQuickRetryPolicy . conditionEvaluationListener ( condition -> logger . info ( "Checking that credentials {0}/{1} are {2}" + "(elapsed time {3}ms, remaining time {4}ms)" , username , password , msg , condition . getElapsedTimeInMS ( ) , condition . getRemainingTimeInMS ( ) ) ) . until ( assertDoesNotThrow ( expectValid ? ( ) -> credentialsValid ( K8S_NODEPORT_HOST , podName , namespace , username , password ) : ( ) -> credentialsNotValid ( K8S_NODEPORT_HOST , podName , namespace , username , password ) , String . format ( "Failed to validate credentials %s/%s on pod %s in namespace %s" , username , password , podName , namespace ) ) ) ; }
Check that the given credentials are valid to access the WebLogic domain.
Check that the given credentials are valid to access the WebLogic domain .