From 2b712bcea1b41982d8902601876f4c8893677d64 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Wed, 24 Jan 2024 13:01:57 -0500 Subject: [PATCH 1/4] Updates admin credentials used in github workflow Signed-off-by: Darshit Chanpura --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c26cda..9d86ccd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -115,16 +115,16 @@ jobs: if: env.imagePresent == 'true' run: | cd .. - docker run -p 9200:9200 -d -p 9600:9600 -e "discovery.type=single-node" opensearch-asynchronous-search:test + docker run -p 9200:9200 -d -p 9600:9600 -e "OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123!" -e "discovery.type=single-node" opensearch-asynchronous-search:test sleep 90 - name: Run Asynchronous Search Test if: env.imagePresent == 'true' run: | - security=`curl -XGET https://localhost:9200/_cat/plugins?v -u admin:admin --insecure |grep opensearch-security|wc -l` + security=`curl -XGET https://localhost:9200/_cat/plugins?v -u admin:myStrongPassword123! --insecure |grep opensearch-security|wc -l` if [ $security -gt 0 ] then echo "Security plugin is available" - ./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin + ./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=myStrongPassword123! else echo "Security plugin is NOT available" ./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" From 172e9dd71edcfa446d0d40a8bc03b1dac50a0db4 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Wed, 24 Jan 2024 13:22:25 -0500 Subject: [PATCH 2/4] Updates README Signed-off-by: Darshit Chanpura --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 66d7bb4..2dcb3f8 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ The project in this package uses the [Gradle](https://docs.gradle.org/current/us 9. `./gradlew asynSearchCluster#rollingUpgradeClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with async search plugin and tests backwards compatibility by performing rolling upgrade of all nodes with the current version of OpenSearch with async search plugin. 10. `./gradlew asynSearchCluster#fullRestartClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with async search plugin and tests backwards compatibility by performing a full restart on the cluster upgrading all the nodes with the current version of OpenSearch with async search plugin. 11. `./gradlew bwcTestSuite -Dtests.security.manager=false` runs all the above bwc tests combined. -12. `./gradlew integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin` launches integration tests against a local cluster and run tests with security +12. `./gradlew integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=` launches integration tests against a local cluster and run tests with security When launching a cluster using one of the above commands, logs are placed in `build/testclusters/integTest-0/logs`. Though the logs are teed to the console, in practices it's best to check the actual log file. From e18849a588fe12228fb54103aeba9de222353105 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Wed, 24 Jan 2024 14:11:45 -0500 Subject: [PATCH 3/4] Updates integTest task to a new default password used in the CI Signed-off-by: Darshit Chanpura --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1103b6f..0abd4b8 100644 --- a/build.gradle +++ b/build.gradle @@ -201,7 +201,8 @@ integTest { systemProperty 'buildDir', buildDir.path systemProperty "https", System.getProperty("https", securityEnabled.toString()) systemProperty "user", System.getProperty("user", "admin") - systemProperty "password", System.getProperty("password", "admin") + defaultAdminPassword = System.getProperty("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "myStrongPassword123!") // this change is needed for >= 2.12 and should not be backported to < 2.12 + systemProperty "password", System.getProperty("password", defaultAdminPassword) // 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 { From 37d12963690687da4fcb459cef75e19f674ca465 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Wed, 24 Jan 2024 14:25:27 -0500 Subject: [PATCH 4/4] Fixes an issue with variable declaration Signed-off-by: Darshit Chanpura --- build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 0abd4b8..a7b84cc 100644 --- a/build.gradle +++ b/build.gradle @@ -201,8 +201,7 @@ integTest { systemProperty 'buildDir', buildDir.path systemProperty "https", System.getProperty("https", securityEnabled.toString()) systemProperty "user", System.getProperty("user", "admin") - defaultAdminPassword = System.getProperty("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "myStrongPassword123!") // this change is needed for >= 2.12 and should not be backported to < 2.12 - systemProperty "password", System.getProperty("password", defaultAdminPassword) + systemProperty "password", System.getProperty("password", "myStrongPassword123!") // this change is needed for >= 2.12 and should not be backported to < 2.12 // 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 {