From e4ee8ab9b8a6c838c4b2b51d44a211c6b048652e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 Feb 2024 20:39:39 +0000 Subject: [PATCH] Fixes password assignment for integTest when using remote cluster (#1091) (cherry picked from commit 027509e3c7ca25fd3f910d48dbd3456597d0a9e1) Signed-off-by: github-actions[bot] --- build.gradle | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 72900401d..302be4e7c 100644 --- a/build.gradle +++ b/build.gradle @@ -527,7 +527,8 @@ integTest { systemProperty "https", System.getProperty("https") systemProperty "security", System.getProperty("security") systemProperty "user", System.getProperty("user", "admin") - systemProperty "password", "admin" // defaulting to admin since security plugin's demo config tool is not used + // a remote cluster requires a custom password to be passed. This password must be a custom password. + systemProperty "password", usingRemoteCluster ? System.getProperty("password", "myStrongPassword123!") : "admin" // defaulting to admin since security plugin's demo config tool is not used // Tell the test JVM if the cluster JVM is running under a debugger so that tests can use longer timeouts for // requests. The 'doFirst' delays reading the debug setting on the cluster till execution time. doFirst { @@ -574,8 +575,6 @@ integTest { // remove from running with remote cluster if (usingRemoteCluster) { exclude 'org/opensearch/indexmanagement/controlcenter/notification/filter/NotificationActionListenerIT.class' - // a remote cluster requires a custom password to be passed. This password must be a custom password. - systemProperty "password", System.getProperty("password", "myStrongPassword123!") } if (project.hasProperty('includeTests')) {