From 69b69f7af1c206331ed1fdef3d031d7c3f085ece Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 15 Mar 2016 20:01:01 -0400 Subject: [PATCH] Use setting in integration test cluster config This commit modifies using system properties to configure an integration test cluster and instead use settings in the generated Elasticsearch config file. Original commit: elastic/x-pack-elasticsearch@65211b93d0efcf0ecbf0fc2b6b93c3b71171131d --- .../qa/shield-audit-tests/build.gradle | 4 ++-- .../qa/shield-core-rest-tests/build.gradle | 4 ++-- .../qa/shield-example-realm/build.gradle | 8 +++---- .../qa/shield-reindex-tests/build.gradle | 2 +- .../qa/smoke-test-plugins-ssl/build.gradle | 22 +++++++++---------- .../build.gradle | 6 ++--- .../build.gradle | 6 ++--- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/elasticsearch/qa/shield-audit-tests/build.gradle b/elasticsearch/qa/shield-audit-tests/build.gradle index e06acc7f91c..749613c9cc4 100644 --- a/elasticsearch/qa/shield-audit-tests/build.gradle +++ b/elasticsearch/qa/shield-audit-tests/build.gradle @@ -7,8 +7,8 @@ dependencies { integTest { cluster { plugin 'x-pack', project(':x-plugins:elasticsearch:x-pack') - systemProperty 'es.shield.audit.enabled', 'true' - systemProperty 'es.shield.audit.outputs', 'index' + setting 'shield.audit.enabled', 'true' + setting 'shield.audit.outputs', 'index' setupCommand 'setupDummyUser', 'bin/xpack/esusers', 'useradd', 'test_user', '-p', 'changeme', '-r', 'admin' waitCondition = { node, ant -> diff --git a/elasticsearch/qa/shield-core-rest-tests/build.gradle b/elasticsearch/qa/shield-core-rest-tests/build.gradle index 97d1915b5a8..d8580fcac10 100644 --- a/elasticsearch/qa/shield-core-rest-tests/build.gradle +++ b/elasticsearch/qa/shield-core-rest-tests/build.gradle @@ -34,8 +34,8 @@ integTest { cluster { plugin 'x-pack', project(':x-plugins:elasticsearch:x-pack') - systemProperty 'es.xpack.watcher.enabled', 'false' - systemProperty 'es.xpack.monitoring.enabled', 'false' + setting 'xpack.watcher.enabled', 'false' + setting 'xpack.monitoring.enabled', 'false' setupCommand 'setupDummyUser', 'bin/xpack/esusers', 'useradd', 'test_user', '-p', 'changeme', '-r', 'admin' waitCondition = { node, ant -> diff --git a/elasticsearch/qa/shield-example-realm/build.gradle b/elasticsearch/qa/shield-example-realm/build.gradle index c7162d4cb45..b6e65102ac4 100644 --- a/elasticsearch/qa/shield-example-realm/build.gradle +++ b/elasticsearch/qa/shield-example-realm/build.gradle @@ -17,10 +17,10 @@ integTest { cluster { plugin 'x-pack', project(':x-plugins:elasticsearch:x-pack') // TODO: these should be settings? - systemProperty 'es.shield.authc.realms.custom.order', '0' - systemProperty 'es.shield.authc.realms.custom.type', 'custom' - systemProperty 'es.shield.authc.realms.esusers.order', '1' - systemProperty 'es.shield.authc.realms.esusers.type', 'esusers' + setting 'shield.authc.realms.custom.order', '0' + setting 'shield.authc.realms.custom.type', 'custom' + setting 'shield.authc.realms.esusers.order', '1' + setting 'shield.authc.realms.esusers.type', 'esusers' setupCommand 'setupDummyUser', 'bin/xpack/esusers', 'useradd', 'test_user', '-p', 'changeme', '-r', 'admin' diff --git a/elasticsearch/qa/shield-reindex-tests/build.gradle b/elasticsearch/qa/shield-reindex-tests/build.gradle index 4eec32ef935..6bfd5017390 100644 --- a/elasticsearch/qa/shield-reindex-tests/build.gradle +++ b/elasticsearch/qa/shield-reindex-tests/build.gradle @@ -6,7 +6,7 @@ dependencies { integTest { cluster { - systemProperty 'es.script.inline', 'true' + setting 'script.inline', 'true' plugin 'x-pack', project(':x-plugins:elasticsearch:x-pack') extraConfigFile 'xpack/roles.yml', 'roles.yml' [ diff --git a/elasticsearch/qa/smoke-test-plugins-ssl/build.gradle b/elasticsearch/qa/smoke-test-plugins-ssl/build.gradle index 733e6c19856..8de1ff62414 100644 --- a/elasticsearch/qa/smoke-test-plugins-ssl/build.gradle +++ b/elasticsearch/qa/smoke-test-plugins-ssl/build.gradle @@ -145,18 +145,18 @@ project.rootProject.subprojects.findAll { it.path.startsWith(':plugins:') }.each integTest { cluster { - systemProperty 'es.xpack.monitoring.agent.interval', '3s' - systemProperty 'es.xpack.monitoring.agent.exporters._http.type', 'http' - systemProperty 'es.xpack.monitoring.agent.exporters._http.enabled', 'false' - systemProperty 'es.xpack.monitoring.agent.exporters._http.ssl.truststore.path', clientKeyStore.name - systemProperty 'es.xpack.monitoring.agent.exporters._http.ssl.truststore.password', 'keypass' - systemProperty 'es.xpack.monitoring.agent.exporters._http.auth.username', 'monitoring_agent' - systemProperty 'es.xpack.monitoring.agent.exporters._http.auth.password', 'changeme' + setting 'xpack.monitoring.agent.interval', '3s' + setting 'xpack.monitoring.agent.exporters._http.type', 'http' + setting 'xpack.monitoring.agent.exporters._http.enabled', 'false' + setting 'xpack.monitoring.agent.exporters._http.ssl.truststore.path', clientKeyStore.name + setting 'xpack.monitoring.agent.exporters._http.ssl.truststore.password', 'keypass' + setting 'xpack.monitoring.agent.exporters._http.auth.username', 'monitoring_agent' + setting 'xpack.monitoring.agent.exporters._http.auth.password', 'changeme' - systemProperty 'es.shield.transport.ssl', 'true' - systemProperty 'es.shield.http.ssl', 'true' - systemProperty 'es.shield.ssl.keystore.path', nodeKeystore.name - systemProperty 'es.shield.ssl.keystore.password', 'keypass' + setting 'shield.transport.ssl', 'true' + setting 'shield.http.ssl', 'true' + setting 'shield.ssl.keystore.path', nodeKeystore.name + setting 'shield.ssl.keystore.password', 'keypass' plugin 'x-pack', project(':x-plugins:elasticsearch:x-pack') diff --git a/elasticsearch/qa/smoke-test-watcher-with-groovy/build.gradle b/elasticsearch/qa/smoke-test-watcher-with-groovy/build.gradle index eb357005ccc..9c2fb304d8d 100644 --- a/elasticsearch/qa/smoke-test-watcher-with-groovy/build.gradle +++ b/elasticsearch/qa/smoke-test-watcher-with-groovy/build.gradle @@ -8,8 +8,8 @@ dependencies { integTest { cluster { plugin 'x-pack', project(':x-plugins:elasticsearch:x-pack') - systemProperty 'es.script.inline', 'true' - systemProperty 'es.xpack.shield.enabled', 'false' - systemProperty 'es.xpack.monitoring.enabled', 'false' + setting 'script.inline', 'true' + setting 'xpack.shield.enabled', 'false' + setting 'xpack.monitoring.enabled', 'false' } } diff --git a/elasticsearch/qa/smoke-test-watcher-with-mustache/build.gradle b/elasticsearch/qa/smoke-test-watcher-with-mustache/build.gradle index efef108a36d..37575d2605b 100644 --- a/elasticsearch/qa/smoke-test-watcher-with-mustache/build.gradle +++ b/elasticsearch/qa/smoke-test-watcher-with-mustache/build.gradle @@ -8,8 +8,8 @@ dependencies { integTest { cluster { plugin 'x-pack', project(':x-plugins:elasticsearch:x-pack') - systemProperty 'es.xpack.shield.enabled', 'false' - systemProperty 'es.xpack.monitoring.enabled', 'false' - systemProperty 'es.http.port', '9400' + setting 'xpack.shield.enabled', 'false' + setting 'xpack.monitoring.enabled', 'false' + setting 'http.port', '9400' } }