Skip to content

Commit 73417bf

Browse files
committed
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.
1 parent aa56892 commit 73417bf

12 files changed

+38
-22
lines changed

x-pack/plugin/ccr/build.gradle

+2-22
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ esplugin {
1414
}
1515
archivesBaseName = 'x-pack-ccr'
1616

17+
integTest.enabled = false
18+
1719
compileJava.options.compilerArgs << "-Xlint:-try"
1820
compileTestJava.options.compilerArgs << "-Xlint:-try"
1921

@@ -27,31 +29,9 @@ task internalClusterTest(type: RandomizedTestingTask,
2729
classpath = project.test.classpath
2830
testClassesDirs = project.test.testClassesDirs
2931
include '**/*IT.class'
30-
exclude '**/CcrRestIT.class'
3132
systemProperty 'es.set.netty.runtime.available.processors', 'false'
3233
}
3334

34-
integTestCluster {
35-
distribution 'zip'
36-
setting 'xpack.ml.enabled', 'false'
37-
setting 'xpack.monitoring.enabled', 'false'
38-
setting 'xpack.security.enabled', 'true'
39-
setting 'xpack.license.self_generated.type', 'trial'
40-
// TODO: reduce the need for superuser here
41-
setupCommand 'setup-ccr-user',
42-
'bin/elasticsearch-users', 'useradd', 'ccr-user', '-p', 'ccr-user-password', '-r', 'superuser'
43-
waitCondition = { node, ant ->
44-
File tmpFile = new File(node.cwd, 'wait.success')
45-
ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow",
46-
dest: tmpFile.toString(),
47-
username: 'ccr-user',
48-
password: 'ccr-user-password',
49-
ignoreerrors: true,
50-
retries: 10)
51-
return tmpFile.exists()
52-
}
53-
}
54-
5535
check.dependsOn internalClusterTest
5636
internalClusterTest.mustRunAfter test
5737

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import org.elasticsearch.gradle.test.RestIntegTestTask
2+
3+
apply plugin: 'elasticsearch.standalone-test'
4+
5+
dependencies {
6+
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
7+
testCompile project(path: xpackModule('ccr'), configuration: 'runtime')
8+
}
9+
10+
task restTest(type: RestIntegTestTask) {
11+
mustRunAfter(precommit)
12+
}
13+
14+
restTestCluster {
15+
distribution 'zip'
16+
setting 'xpack.ml.enabled', 'false'
17+
setting 'xpack.monitoring.enabled', 'false'
18+
setting 'xpack.security.enabled', 'true'
19+
setting 'xpack.license.self_generated.type', 'trial'
20+
// TODO: reduce the need for superuser here
21+
setupCommand 'setup-ccr-user',
22+
'bin/elasticsearch-users', 'useradd', 'ccr-user', '-p', 'ccr-user-password', '-r', 'superuser'
23+
waitCondition = { node, ant ->
24+
File tmpFile = new File(node.cwd, 'wait.success')
25+
ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow",
26+
dest: tmpFile.toString(),
27+
username: 'ccr-user',
28+
password: 'ccr-user-password',
29+
ignoreerrors: true,
30+
retries: 10)
31+
return tmpFile.exists()
32+
}
33+
}
34+
35+
check.dependsOn restTest
36+
test.enabled = false

0 commit comments

Comments
 (0)