2017-01-03 15:43:22 -05:00
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
2015-12-10 09:34:30 -05:00
|
|
|
apply plugin: 'elasticsearch.rest-test'
|
|
|
|
|
|
|
|
dependencies {
|
2016-12-14 18:02:28 -05:00
|
|
|
testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime')
|
2015-12-10 09:34:30 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// bring in graph rest test suite
|
|
|
|
task copyGraphRestTests(type: Copy) {
|
|
|
|
into project.sourceSets.test.output.resourcesDir
|
2016-12-14 18:02:28 -05:00
|
|
|
from project(':x-pack:elasticsearch').sourceSets.test.resources.srcDirs
|
2015-12-10 09:34:30 -05:00
|
|
|
include 'rest-api-spec/test/graph/**'
|
|
|
|
}
|
|
|
|
|
|
|
|
integTest {
|
|
|
|
dependsOn copyGraphRestTests
|
|
|
|
|
|
|
|
cluster {
|
2016-12-14 18:02:28 -05:00
|
|
|
plugin ':x-pack:elasticsearch'
|
2016-03-30 03:07:57 -04:00
|
|
|
extraConfigFile 'x-pack/roles.yml', 'roles.yml'
|
2015-12-10 09:34:30 -05:00
|
|
|
setupCommand 'setupTestAdminUser',
|
2016-02-10 09:42:59 -05:00
|
|
|
'bin/x-pack/users', 'useradd', 'test_admin', '-p', 'changeme', '-r', 'superuser'
|
2015-12-10 09:34:30 -05:00
|
|
|
setupCommand 'setupGraphExplorerUser',
|
2016-03-30 03:07:57 -04:00
|
|
|
'bin/x-pack/users', 'useradd', 'graph_explorer', '-p', 'changeme', '-r', 'graph_explorer'
|
2015-12-10 09:34:30 -05:00
|
|
|
setupCommand 'setupPowerlessUser',
|
2016-03-30 03:07:57 -04:00
|
|
|
'bin/x-pack/users', 'useradd', 'no_graph_explorer', '-p', 'changeme', '-r', 'no_graph_explorer'
|
2015-12-10 09:34:30 -05:00
|
|
|
waitCondition = { node, ant ->
|
|
|
|
File tmpFile = new File(node.cwd, 'wait.success')
|
|
|
|
ant.get(src: "http://${node.httpUri()}",
|
|
|
|
dest: tmpFile.toString(),
|
|
|
|
username: 'test_admin',
|
|
|
|
password: 'changeme',
|
|
|
|
ignoreerrors: true,
|
|
|
|
retries: 10)
|
|
|
|
return tmpFile.exists()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|