Browse Source

Move CCR REST tests to a sub-project of ccr

This commit moves these REST tests (possibly temporarily) to a
sub-project of ccr. We do this (again, possibly temporarily) to keep
them within the ccr sub-project yet there are changes within 6.x that
prevent these from being in the top-level project (the cluster formation
tasks are trying to install x-pack-ccr into the
integ-test-zip). Therefore, we isolate these for now until we can
understand why there are differences between 6.x and master.
Jason Tedor 7 years ago
parent
commit
73417bf09a

+ 2 - 22
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
 

+ 36 - 0
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

+ 0 - 0
x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/CcrRestIT.java → x-pack/plugin/ccr/qa/rest/src/test/java/org/elasticsearch/xpack/ccr/CcrRestIT.java


+ 0 - 0
x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.create_and_follow_index.json → x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.create_and_follow_index.json


+ 0 - 0
x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.delete_auto_follow_pattern.json → x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.delete_auto_follow_pattern.json


+ 0 - 0
x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.follow_index.json → x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.follow_index.json


+ 0 - 0
x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.put_auto_follow_pattern.json → x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.put_auto_follow_pattern.json


+ 0 - 0
x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.stats.json → x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.stats.json


+ 0 - 0
x-pack/plugin/ccr/src/test/resources/rest-api-spec/api/ccr.unfollow_index.json → x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/api/ccr.unfollow_index.json


+ 0 - 0
x-pack/plugin/ccr/src/test/resources/rest-api-spec/test/ccr/auto_follow.yml → x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/auto_follow.yml


+ 0 - 0
x-pack/plugin/ccr/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml → x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml


+ 0 - 0
x-pack/plugin/ccr/src/test/resources/rest-api-spec/test/ccr/stats.yml → x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/stats.yml