From 71d50ec0588b3616f21cbf4a224ad6db7986cff7 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 24 Nov 2015 19:41:50 -0500 Subject: [PATCH] add back shield audit qa tests Original commit: elastic/x-pack-elasticsearch@f34b2c99e9a6c710ed263433f456bc7d77133a52 --- qa/shield-audit-tests/build.gradle | 28 +++++++ qa/shield-audit-tests/integration-tests.xml | 90 --------------------- 2 files changed, 28 insertions(+), 90 deletions(-) create mode 100644 qa/shield-audit-tests/build.gradle delete mode 100644 qa/shield-audit-tests/integration-tests.xml 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}... - - - - -