dependencies { testCompile(project(path: ':x-pack-elasticsearch:plugin', configuration: 'runtime')) { transitive = false } } integTestCluster { // Setup auditing so we can use it in some tests setting 'xpack.security.audit.enabled', 'true' setting 'xpack.security.audit.outputs', 'logfile' // Setup roles used by tests extraConfigFile 'x-pack/roles.yml', 'roles.yml' /* Setup the one admin user that we run the tests as. * Tests use "run as" to get different users. */ setupCommand 'setupUser#test_admin', 'bin/x-pack/users', 'useradd', 'test_admin', '-p', 'x-pack-test-password', '-r', 'superuser' // Override the wait condition to work properly with security waitCondition = { node, ant -> File tmpFile = new File(node.cwd, 'wait.success') ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow", dest: tmpFile.toString(), username: 'test_admin', password: 'x-pack-test-password', ignoreerrors: true, retries: 10) return tmpFile.exists() } } integTestRunner { systemProperty 'tests.audit.logfile', "${ -> integTest.nodes[0].homeDir}/logs/${ -> integTest.nodes[0].clusterName }_access.log" } run { // Setup auditing so we can use it in some tests setting 'xpack.security.audit.enabled', 'true' setting 'xpack.security.audit.outputs', 'logfile' // Setup roles used by tests extraConfigFile 'x-pack/roles.yml', 'roles.yml' /* Setup the one admin user that we run the tests as. * Tests use "run as" to get different users. */ setupCommand 'setupUser#test_admin', 'bin/x-pack/users', 'useradd', 'test_admin', '-p', 'x-pack-test-password', '-r', 'superuser' // Override the wait condition to work properly with security waitCondition = { node, ant -> File tmpFile = new File(node.cwd, 'wait.success') ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow", dest: tmpFile.toString(), username: 'test_admin', password: 'x-pack-test-password', ignoreerrors: true, retries: 10) return tmpFile.exists() } }