subprojects { apply plugin: 'elasticsearch.rest-test' dependencies { testCompile project(path: ':x-plugins:elasticsearch:x-pack', configuration: 'runtime') } // bring in monitoring rest test suite task copyMonitoringRestTests(type: Copy) { into project.sourceSets.test.output.resourcesDir from project(':x-plugins:elasticsearch:x-pack').sourceSets.test.resources.srcDirs include 'rest-api-spec/test/monitoring/**' } integTest { dependsOn copyMonitoringRestTests cluster { systemProperty 'es.logger.level', 'TRACE' plugin 'x-pack', project(':x-plugins:elasticsearch:x-pack') setting 'xpack.monitoring.collection.interval', '3s' extraConfigFile 'x-pack/roles.yml', '../roles.yml' setupCommand 'setupTestAdminUser', 'bin/x-pack/users', 'useradd', 'test_admin', '-p', 'changeme', '-r', 'superuser' setupCommand 'setupMonitoredSystemUser', 'bin/x-pack/users', 'useradd', 'monitoring_system', '-p', 'changeme', '-r', 'monitoring_system,monitoring_without_bulk' setupCommand 'setupPowerlessUser', 'bin/x-pack/users', 'useradd', 'not_monitoring_system', '-p', 'changeme', '-r', 'monitoring_without_bulk' 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() } } } } /** * Allow {@code integTest} to be invoked on this project to run both Monitoring+Security smoke tests. */ task integTest { dependsOn subprojects.integTest }