diff --git a/qa/shield-audit-tests/build.gradle b/qa/shield-audit-tests/build.gradle new file mode 100644 index 00000000000..9ebb5cc83c9 --- /dev/null +++ b/qa/shield-audit-tests/build.gradle @@ -0,0 +1,28 @@ +apply plugin: 'elasticsearch.rest-test' + +dependencies { + testCompile project(path: ':x-plugins:shield', configuration: 'runtime') +} + +integTest { + cluster { + plugin 'license', project(':x-plugins:license:plugin') + plugin 'shield', project(':x-plugins:shield') + // TODO: these should be settings? + systemProperty 'es.shield.audit.enabled', 'true' + systemProperty 'es.shield.audit.outputs', 'index' + setupCommand 'setupDummyUser', + 'bin/shield/esusers', 'useradd', 'test_user', '-p', 'changeme', '-r', 'admin' + waitCondition = { node, ant -> + File tmpFile = new File(node.cwd, 'wait.success') + ant.get(src: "http://localhost:${node.httpPort()}", + dest: tmpFile.toString(), + username: 'test_user', + password: 'changeme', + ignoreerrors: true, + retries: 10) + return tmpFile.exists() + } + } +} + diff --git a/qa/shield-audit-tests/integration-tests.xml b/qa/shield-audit-tests/integration-tests.xml deleted file mode 100644 index 24ee45c2cdc..00000000000 --- a/qa/shield-audit-tests/integration-tests.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - Waiting for elasticsearch to become available on port @{port}... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adding shield users... - - - - - - - - - - - - - - - - - - - Checking we can connect with basic auth on port ${integ.http.port}... - - - - -