diff --git a/qa/smoke-test-watcher-with-shield/build.gradle b/qa/smoke-test-watcher-with-shield/build.gradle new file mode 100644 index 00000000000..eb1568c4ce5 --- /dev/null +++ b/qa/smoke-test-watcher-with-shield/build.gradle @@ -0,0 +1,45 @@ +apply plugin: 'elasticsearch.rest-test' + +dependencies { + testCompile project(path: ':x-plugins:shield', configuration: 'runtime') + testCompile project(path: ':x-plugins:watcher', configuration: 'runtime') +} + +// bring in watcher rest test suite +task copyWatcherRestTests(type: Copy) { + into project.sourceSets.test.output.resourcesDir + from project(':x-plugins:watcher').sourceSets.test.resources.srcDirs + include 'rest-api-spec/test/**' +} + +integTest.dependsOn(copyWatcherRestTests) + +integTest { + systemProperty 'tests.rest.blacklist', + ['hijack/10_basic/*', + 'array_compare_watch/10_basic/Basic array_compare watch'].join(',') + + cluster { + plugin 'license', project(':x-plugins:license:plugin') + plugin 'shield', project(':x-plugins:shield') + plugin 'watcher', project(':x-plugins:watcher') + extraConfigFile 'shield', 'roles.yml' + setupCommand 'setupTestAdminUser', + 'bin/shield/esusers', 'useradd', 'test_admin', '-p', 'changeme', '-r', 'admin' + setupCommand 'setupWatcherManagerUser', + 'bin/shield/esusers', 'useradd', 'watcher_manager', '-p', 'changeme', '-r', 'watcher_manager' + setupCommand 'setupPowerlessUser', + 'bin/shield/esusers', 'useradd', 'powerless_user', '-p', 'changeme', '-r', 'crapy_role' + waitCondition = { node, ant -> + File tmpFile = new File(node.cwd, 'wait.success') + ant.get(src: "http://localhost:${node.httpPort()}", + dest: tmpFile.toString(), + username: 'test_admin', + password: 'changeme', + ignoreerrors: true, + retries: 10) + return tmpFile.exists() + } + } +} + diff --git a/qa/smoke-test-watcher-with-shield/integration-tests.xml b/qa/smoke-test-watcher-with-shield/integration-tests.xml deleted file mode 100644 index 8b0d6aedf22..00000000000 --- a/qa/smoke-test-watcher-with-shield/integration-tests.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - Waiting for elasticsearch to become available on port @{port}... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adding roles.yml with watcher roles - - - Adding shield users... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Checking we can connect with basic auth on port ${integ.http.port}... - - - - - diff --git a/qa/smoke-test-watcher-with-shield/watcher-with-shield-roles.yml b/qa/smoke-test-watcher-with-shield/roles.yml similarity index 100% rename from qa/smoke-test-watcher-with-shield/watcher-with-shield-roles.yml rename to qa/smoke-test-watcher-with-shield/roles.yml