build.gradle 1.2 KB

1234567891011121314151617181920212223242526272829
  1. apply plugin: 'elasticsearch.standalone-rest-test'
  2. apply plugin: 'elasticsearch.rest-test'
  3. dependencies {
  4. testCompile project(path: xpackModule('core'), configuration: 'runtime')
  5. }
  6. integTestCluster {
  7. numNodes = 2
  8. clusterName = 'multi-node'
  9. setting 'xpack.security.enabled', 'true'
  10. setting 'xpack.watcher.enabled', 'false'
  11. setting 'xpack.monitoring.enabled', 'false'
  12. setting 'xpack.ml.enabled', 'false'
  13. setting 'xpack.license.self_generated.type', 'trial'
  14. extraConfigFile 'roles.yml', 'roles.yml'
  15. setupCommand 'setup-test-user', 'bin/elasticsearch-users', 'useradd', 'test-user', '-p', 'x-pack-test-password', '-r', 'test'
  16. setupCommand 'setup-super-user', 'bin/elasticsearch-users', 'useradd', 'super-user', '-p', 'x-pack-super-password', '-r', 'superuser'
  17. waitCondition = { node, ant ->
  18. File tmpFile = new File(node.cwd, 'wait.success')
  19. ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow",
  20. dest: tmpFile.toString(),
  21. username: 'super-user',
  22. password: 'x-pack-super-password',
  23. ignoreerrors: true,
  24. retries: 10)
  25. return tmpFile.exists()
  26. }
  27. }