From 99ac9229d3c72b51d341c4dceac822b8c8b424a0 Mon Sep 17 00:00:00 2001 From: Subhobrata Dey Date: Mon, 14 Nov 2022 10:09:04 -0800 Subject: [PATCH] fix to support https as param for security integ tests (#156) Signed-off-by: Subhobrata Dey (cherry picked from commit 7d071895156b9257fde7844bda396413ba5ee2df) --- .github/workflows/security-test-workflow.yml | 2 +- build.gradle | 2 -- .../securityanalytics/SecurityAnalyticsRestTestCase.java | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/security-test-workflow.yml b/.github/workflows/security-test-workflow.yml index 8c0b09e9b..f600314e2 100644 --- a/.github/workflows/security-test-workflow.yml +++ b/.github/workflows/security-test-workflow.yml @@ -82,7 +82,7 @@ jobs: 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 -Dsecurity=true -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=admin else echo "Security plugin is NOT available skipping this run as tests without security have already been run" fi diff --git a/build.gradle b/build.gradle index 17ba91318..a158763bb 100644 --- a/build.gradle +++ b/build.gradle @@ -165,7 +165,6 @@ integTest { systemProperty 'java.io.tmpdir', es_tmp_dir.absolutePath systemProperty "https", System.getProperty("https") - systemProperty "security", System.getProperty("security") systemProperty "user", System.getProperty("user") systemProperty "password", System.getProperty("password") @@ -309,7 +308,6 @@ task integTestRemote(type: RestIntegTestTask) { systemProperty 'java.io.tmpdir', opensearch_tmp_dir.absolutePath systemProperty "https", System.getProperty("https") - systemProperty "security", System.getProperty("security") systemProperty "user", System.getProperty("user") systemProperty "password", System.getProperty("password") diff --git a/src/test/java/org/opensearch/securityanalytics/SecurityAnalyticsRestTestCase.java b/src/test/java/org/opensearch/securityanalytics/SecurityAnalyticsRestTestCase.java index 051f7f26b..086457225 100644 --- a/src/test/java/org/opensearch/securityanalytics/SecurityAnalyticsRestTestCase.java +++ b/src/test/java/org/opensearch/securityanalytics/SecurityAnalyticsRestTestCase.java @@ -935,7 +935,7 @@ protected boolean isHttps() { } protected boolean securityEnabled() { - return Boolean.parseBoolean(System.getProperty("security", "false")); + return Boolean.parseBoolean(System.getProperty("https", "false")); } @Override