Fixing bwc test for repository-multi-version (#1441)

Signed-off-by: Vacha <vachshah@amazon.com>
This commit is contained in:
Vacha 2021-10-27 07:41:13 -07:00 committed by GitHub
parent 39ddb774d8
commit 3f6e1df9eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 9 deletions

View File

@ -76,16 +76,28 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
systemProperty 'tests.rest.suite', 'step2'
}
tasks.register("${baseName}#Step3OldClusterTest", StandaloneRestIntegTestTask) {
// Step 3 and Step 4 registered for versions for OpenSearch
// since the ES cluster would not be able to read snapshots from OpenSearch cluster in Step 3.
if (bwcVersion.after('7.10.2')) {
tasks.register("${baseName}#Step3OldClusterTest", StandaloneRestIntegTestTask) {
useCluster testClusters."${oldClusterName}"
dependsOn "${baseName}#Step2NewClusterTest"
systemProperty 'tests.rest.suite', 'step3'
}
tasks.register("${baseName}#Step4NewClusterTest", StandaloneRestIntegTestTask) {
useCluster testClusters."${newClusterName}"
dependsOn "${baseName}#Step3OldClusterTest"
systemProperty 'tests.rest.suite', 'step4'
tasks.register("${baseName}#Step4NewClusterTest", StandaloneRestIntegTestTask) {
useCluster testClusters."${newClusterName}"
dependsOn "${baseName}#Step3OldClusterTest"
systemProperty 'tests.rest.suite', 'step4'
}
tasks.register(bwcTaskName(bwcVersion)) {
dependsOn tasks.named("${baseName}#Step4NewClusterTest")
}
} else {
tasks.register(bwcTaskName(bwcVersion)) {
dependsOn tasks.named("${baseName}#Step2NewClusterTest")
}
}
tasks.matching { it.name.startsWith(baseName) && it.name.endsWith("ClusterTest") }.configureEach {
@ -95,10 +107,6 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
it.nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${clusterName}".allHttpSocketURI.join(",")}")
it.nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${clusterName}".getName()}")
}
tasks.register(bwcTaskName(bwcVersion)) {
dependsOn tasks.named("${baseName}#Step4NewClusterTest")
}
}
configurations {