diff --git a/build.gradle b/build.gradle index d83751f43..0dfc3c897 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,6 @@ import java.nio.file.Paths buildscript { ext { opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT") - bwcVersionShort = "2.12.0" buildVersionQualifier = System.getProperty("build.version_qualifier", "") isSnapshot = "true" == System.getProperty("build.snapshot", "true") version_tokens = opensearch_version.tokenize('-') @@ -207,6 +206,12 @@ jacocoTestReport { } tasks.named("check").configure { dependsOn(jacocoTestReport) } +tasks.named("yamlRestTest").configure { + filter { + exclude "**" + includeTestsMatching "**/*YamlTestSuiteIT.*" + } +} // Set up integration tests task integTest(type: RestIntegTestTask) { @@ -505,6 +510,7 @@ List> plugins = [ // Creates 2 test clusters with 3 nodes of the old version. 2.times {i -> task "${baseName}#oldVersionClusterTask$i"(type: StandaloneRestIntegTestTask) { + onlyIf { isSameMajorVersion || (i == 1) } useCluster testClusters."${baseName}$i" filter { includeTestsMatching "org.opensearch.flowframework.bwc.*IT" @@ -521,6 +527,7 @@ List> plugins = [ // This results in a mixed cluster with 2 nodes on the old version and 1 upgraded node. // This is also used as a one third upgraded cluster for a rolling upgrade. task "${baseName}#mixedClusterTask"(type: StandaloneRestIntegTestTask) { + onlyIf { isSameMajorVersion } useCluster testClusters."${baseName}0" dependsOn "${baseName}#oldVersionClusterTask0" doFirst { @@ -540,6 +547,7 @@ task "${baseName}#mixedClusterTask"(type: StandaloneRestIntegTestTask) { // This results in a mixed cluster with 1 node on the old version and 2 upgraded nodes. // This is used for rolling upgrade. task "${baseName}#twoThirdsUpgradedClusterTask"(type: StandaloneRestIntegTestTask) { + onlyIf { isSameMajorVersion } dependsOn "${baseName}#mixedClusterTask" useCluster testClusters."${baseName}0" doFirst { @@ -559,6 +567,7 @@ task "${baseName}#twoThirdsUpgradedClusterTask"(type: StandaloneRestIntegTestTas // This results in a fully upgraded cluster. // This is used for rolling upgrade. task "${baseName}#rollingUpgradeClusterTask"(type: StandaloneRestIntegTestTask) { + onlyIf { isSameMajorVersion } dependsOn "${baseName}#twoThirdsUpgradedClusterTask" useCluster testClusters."${baseName}0" doFirst { @@ -614,6 +623,11 @@ allprojects { } } } + // Needed for Gradle 9.0 + tasks.withType(StandaloneRestIntegTestTask).configureEach { + testClassesDirs = sourceSets.test.output.classesDirs + classpath = sourceSets.test.runtimeClasspath + } } // Automatically sets up the integration test cluster locally