Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-with-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
- name: Run Job-scheduler Integ Tests with Security
run: |
echo "Running integ tests with security..."
./gradlew :integTest --tests "*RestIT" -Dhttps=true -Dsecurity=true -Dtests.opensearch.secure=true -Dtests.opensearch.username=admin -Dtests.opensearch.password=admin -Duser=admin -Dpassword=admin
./gradlew :integTest --tests "*RestIT" -Dhttps=true -Dsecurity.enabled=true -Dtests.opensearch.secure=true -Dtests.opensearch.username=admin -Dtests.opensearch.password=admin -Duser=admin -Dpassword=admin
25 changes: 14 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,18 @@ ext {
licenseFile = rootProject.file('LICENSE.txt')
noticeFile = rootProject.file('NOTICE')

['esnode.pem', 'esnode-key.pem', 'kirk.pem', 'kirk-key.pem', 'root-ca.pem', 'sample.pem', 'test-kirk.jks'].forEach { file ->
File local = getLayout().getBuildDirectory().file(file).get().getAsFile()
download.run {
src "https://raw.githubusercontent.com/opensearch-project/security/refs/heads/main/bwc-test/src/test/resources/security/" + file
dest local
overwrite false
}
processResources {
from(local)
runIntegTestWithSecurityPlugin= System.getProperty("security.enabled")
if (runIntegTestWithSecurityPlugin == "true"){
['esnode.pem', 'esnode-key.pem', 'kirk.pem', 'kirk-key.pem', 'root-ca.pem', 'sample.pem', 'test-kirk.jks'].forEach { file ->
File local = getLayout().getBuildDirectory().file(file).get().getAsFile()
download.run {
src "https://raw.githubusercontent.com/opensearch-project/security/refs/heads/main/bwc-test/src/test/resources/security/" + file
dest local
overwrite false
}
processResources {
from(local)
}
}
}
}
Expand Down Expand Up @@ -281,7 +284,7 @@ def securityPluginFile = resolvePluginFile("opensearch-security")

// === Setup security test ===
// This flag indicates the existence of security plugin
def securityEnabled = System.getProperty("security", "false") == "true" || System.getProperty("https", "false") == "true"
def securityEnabled = System.getProperty("security.enabled", "false") == "true" || System.getProperty("https", "false") == "true"
afterEvaluate {
testClusters.integTest.nodes.each { node ->
def plugins = node.plugins
Expand Down Expand Up @@ -360,7 +363,7 @@ task integTestRemote(type: RestIntegTestTask) {
systemProperty 'java.io.tmpdir', opensearch_tmp_dir.absolutePath

systemProperty "https", System.getProperty("https")
systemProperty "security", System.getProperty("security")
systemProperty "security.enabled", System.getProperty("security.enabled")
systemProperty "user", System.getProperty("user")
systemProperty "password", System.getProperty("password")
systemProperty 'tests.rest.cluster', 'localhost:9200'
Expand Down
Loading