diff --git a/x-pack/plugin/ccr/build.gradle b/x-pack/plugin/ccr/build.gradle index f4c7c09c19e..ea8aa897777 100644 --- a/x-pack/plugin/ccr/build.gradle +++ b/x-pack/plugin/ccr/build.gradle @@ -14,6 +14,8 @@ esplugin { } archivesBaseName = 'x-pack-ccr' +integTest.enabled = false + compileJava.options.compilerArgs << "-Xlint:-try" compileTestJava.options.compilerArgs << "-Xlint:-try" @@ -27,31 +29,9 @@ task internalClusterTest(type: RandomizedTestingTask, classpath = project.test.classpath testClassesDirs = project.test.testClassesDirs include '**/*IT.class' - exclude '**/CcrRestIT.class' systemProperty 'es.set.netty.runtime.available.processors', 'false' } -integTestCluster { - distribution 'zip' - setting 'xpack.ml.enabled', 'false' - setting 'xpack.monitoring.enabled', 'false' - setting 'xpack.security.enabled', 'true' - setting 'xpack.license.self_generated.type', 'trial' - // TODO: reduce the need for superuser here - setupCommand 'setup-ccr-user', - 'bin/elasticsearch-users', 'useradd', 'ccr-user', '-p', 'ccr-user-password', '-r', 'superuser' - 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: 'ccr-user', - password: 'ccr-user-password', - ignoreerrors: true, - retries: 10) - return tmpFile.exists() - } -} - check.dependsOn internalClusterTest internalClusterTest.mustRunAfter test diff --git a/x-pack/plugin/ccr/qa/rest/build.gradle b/x-pack/plugin/ccr/qa/rest/build.gradle new file mode 100644 index 00000000000..cfd24123f42 --- /dev/null +++ b/x-pack/plugin/ccr/qa/rest/build.gradle @@ -0,0 +1,36 @@ +import org.elasticsearch.gradle.test.RestIntegTestTask + +apply plugin: 'elasticsearch.standalone-test' + +dependencies { + testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') + testCompile project(path: xpackModule('ccr'), configuration: 'runtime') +} + +task restTest(type: RestIntegTestTask) { + mustRunAfter(precommit) +} + +restTestCluster { + distribution 'zip' + setting 'xpack.ml.enabled', 'false' + setting 'xpack.monitoring.enabled', 'false' + setting 'xpack.security.enabled', 'true' + setting 'xpack.license.self_generated.type', 'trial' + // TODO: reduce the need for superuser here + setupCommand 'setup-ccr-user', + 'bin/elasticsearch-users', 'useradd', 'ccr-user', '-p', 'ccr-user-password', '-r', 'superuser' + 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: 'ccr-user', + password: 'ccr-user-password', + ignoreerrors: true, + retries: 10) + return tmpFile.exists() + } +} + +check.dependsOn restTest +test.enabled = false diff --git a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/CcrRestIT.java b/x-pack/plugin/ccr/qa/rest/src/test/java/org/elasticsearch/xpack/ccr/CcrRestIT.java similarity index 100% rename from x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/CcrRestIT.java rename to x-pack/plugin/ccr/qa/rest/src/test/java/org/elasticsearch/xpack/ccr/CcrRestIT.java diff --git a/x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.create_and_follow_index.json b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.create_and_follow_index.json similarity index 100% rename from x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.create_and_follow_index.json rename to x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.create_and_follow_index.json diff --git a/x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.delete_auto_follow_pattern.json b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.delete_auto_follow_pattern.json similarity index 100% rename from x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.delete_auto_follow_pattern.json rename to x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.delete_auto_follow_pattern.json diff --git a/x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.follow_index.json b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.follow_index.json similarity index 100% rename from x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.follow_index.json rename to x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.follow_index.json diff --git a/x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.put_auto_follow_pattern.json b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.put_auto_follow_pattern.json similarity index 100% rename from x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.put_auto_follow_pattern.json rename to x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.put_auto_follow_pattern.json diff --git a/x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.stats.json b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.stats.json similarity index 100% rename from x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.stats.json rename to x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.stats.json diff --git a/x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.unfollow_index.json b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.unfollow_index.json similarity index 100% rename from x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.unfollow_index.json rename to x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.unfollow_index.json diff --git a/x-pack/plugin/ccr/src/test/resources/rest-api-spec/test/ccr/auto_follow.yml b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/auto_follow.yml similarity index 100% rename from x-pack/plugin/ccr/src/test/resources/rest-api-spec/test/ccr/auto_follow.yml rename to x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/auto_follow.yml diff --git a/x-pack/plugin/ccr/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml similarity index 100% rename from x-pack/plugin/ccr/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml rename to x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml diff --git a/x-pack/plugin/ccr/src/test/resources/rest-api-spec/test/ccr/stats.yml b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/stats.yml similarity index 100% rename from x-pack/plugin/ccr/src/test/resources/rest-api-spec/test/ccr/stats.yml rename to x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/stats.yml