Skip to content

Commit 3559a48

Browse files
download security keys only if -Dsecurity.enabled==true (opensearch-project#680) (opensearch-project#681)
* download security keys only if -Dsecurity.enabled==true Signed-off-by: Varun Jain <varunudr@amazon.com> * Reverting HybridQueryPhaseSearchTests Signed-off-by: Varun Jain <varunudr@amazon.com> --------- Signed-off-by: Varun Jain <varunudr@amazon.com> (cherry picked from commit ff95604) Co-authored-by: Varun Jain <varunudr@amazon.com>
1 parent d8f126f commit 3559a48

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

build.gradle

+9-6
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,15 @@ ext {
7676
currentBundleVersion = opensearch_version.replace("-SNAPSHOT","")
7777

7878
// Config below including files are copied from security demo configuration
79-
['esnode.pem', 'esnode-key.pem', 'root-ca.pem','kirk.pem','kirk-key.pem'].forEach { file ->
80-
File local = Paths.get(opensearch_tmp_dir.absolutePath, file).toFile()
81-
download.run {
82-
src "https://raw.githubusercontent.com/opensearch-project/security/main/bwc-test/src/test/resources/security/" + file
83-
dest local
84-
overwrite false
79+
runIntegTestWithSecurityPlugin= System.getProperty("security.enabled")
80+
if (runIntegTestWithSecurityPlugin == "true"){
81+
['esnode.pem', 'esnode-key.pem', 'root-ca.pem','kirk.pem','kirk-key.pem'].forEach { file ->
82+
File local = Paths.get(opensearch_tmp_dir.absolutePath, file).toFile()
83+
download.run {
84+
src "https://raw.githubusercontent.com/opensearch-project/security/main/bwc-test/src/test/resources/security/" + file
85+
dest local
86+
overwrite false
87+
}
8588
}
8689
}
8790

0 commit comments

Comments
 (0)