Skip to content
Merged
8 changes: 8 additions & 0 deletions modules/ingest-geoip/qa/full-cluster-restart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask

apply plugin: 'elasticsearch.internal-java-rest-test'
Expand All @@ -24,3 +25,10 @@ buildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
systemProperty("tests.old_cluster_version", bwcVersion)
}
}

tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
// We use a phony version here as the real version is provided via `tests.bwc.main.version` system property
usesBwcDistribution(Version.fromString("0.0.0"))
systemProperty("tests.old_cluster_version", "0.0.0")
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
}
7 changes: 7 additions & 0 deletions qa/full-cluster-restart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ tasks.register("luceneBwcTest", StandaloneRestIntegTestTask) {
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
}

tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
// We use a phony version here as the real version is provided via `tests.bwc.main.version` system property
usesBwcDistribution(Version.fromString("0.0.0"))
systemProperty("tests.old_cluster_version", "0.0.0")
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
}

tasks.withType(Test).configureEach {
// CI doesn't like it when there's multiple clusters running at once
maxParallelForks = 1
Expand Down
5 changes: 0 additions & 5 deletions qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
usesBwcDistribution(Version.fromString("0.0.0"))
systemProperty("tests.old_cluster_version", "0.0.0")
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
filter {
// filter tests initially for quicker iterations
// TODO remove once expanding the test set to other modules
includeTestsMatching("org.elasticsearch.upgrades.IndexingIT")
}
}

tasks.withType(Test).configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,12 @@ public Path getConfigDir() {
}

public boolean isSecurityEnabled() {
return Boolean.parseBoolean(getSetting("xpack.security.enabled", getVersion().onOrAfter("8.0.0") ? "true" : "false"));
return Boolean.parseBoolean(
getSetting(
"xpack.security.enabled",
getVersion().equals(Version.fromString("0.0.0")) || getVersion().onOrAfter("8.0.0") ? "true" : "false"
)
);
}

public boolean isRemoteClusterServerEnabled() {
Expand Down
8 changes: 8 additions & 0 deletions x-pack/plugin/ent-search/qa/full-cluster-restart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask

apply plugin: 'elasticsearch.internal-java-rest-test'
Expand All @@ -22,3 +23,10 @@ buildParams.bwcVersions.withWireCompatible(v -> v.after("8.8.0")) { bwcVersion,
systemProperty("tests.old_cluster_version", bwcVersion)
}
}

tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
// We use a phony version here as the real version is provided via `tests.bwc.main.version` system property
usesBwcDistribution(Version.fromString("0.0.0"))
systemProperty("tests.old_cluster_version", "0.0.0")
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
}
7 changes: 7 additions & 0 deletions x-pack/plugin/esql/qa/server/mixed-cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ buildParams.bwcVersions.withWireCompatible(supportedVersion) { bwcVersion, baseN
}
}

tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
// We use a phony version here as the real version is provided via `tests.bwc.main.version` system property
usesBwcDistribution(Version.fromString("0.0.0"))
systemProperty("tests.old_cluster_version", "0.0.0")
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
}

tasks.named("yamlRestTest") {
enabled = false
}
6 changes: 6 additions & 0 deletions x-pack/plugin/inference/qa/mixed-cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ buildParams.bwcVersions.withWireCompatible(supportedVersion) { bwcVersion, baseN
}
}

tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
// We use a phony version here as the real version is provided via `tests.bwc.main.version` system property
usesBwcDistribution(Version.fromString("0.0.0"))
systemProperty("tests.old_cluster_version", "0.0.0")
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
}
7 changes: 7 additions & 0 deletions x-pack/plugin/inference/qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask

apply plugin: 'elasticsearch.internal-java-rest-test'
Expand All @@ -27,3 +28,9 @@ buildParams.bwcVersions.withWireCompatible(v -> v.after("8.11.0")) { bwcVersion,
}
}

tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
// We use a phony version here as the real version is provided via `tests.bwc.main.version` system property
usesBwcDistribution(Version.fromString("0.0.0"))
systemProperty("tests.old_cluster_version", "0.0.0")
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
}
8 changes: 8 additions & 0 deletions x-pack/plugin/security/qa/multi-cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask

apply plugin: 'elasticsearch.internal-java-rest-test'
Expand Down Expand Up @@ -43,3 +44,10 @@ buildParams.bwcVersions.withWireCompatible() { bwcVersion, baseName ->
include '**/RemoteClusterSecurityBWCToRCS2ClusterRestIT.class'
}
}

tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
// We use a phony version here as the real version is provided via `tests.bwc.main.version` system property
usesBwcDistribution(Version.fromString("0.0.0"))
systemProperty("tests.old_cluster_version", "0.0.0")
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
}
8 changes: 8 additions & 0 deletions x-pack/plugin/shutdown/qa/full-cluster-restart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask

apply plugin: 'elasticsearch.internal-java-rest-test'
Expand All @@ -25,3 +26,10 @@ buildParams.bwcVersions.withIndexCompatible { bwcVersion, baseName ->
systemProperty("tests.old_cluster_version", bwcVersion)
}
}

tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
// We use a phony version here as the real version is provided via `tests.bwc.main.version` system property
usesBwcDistribution(Version.fromString("0.0.0"))
systemProperty("tests.old_cluster_version", "0.0.0")
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
}
8 changes: 8 additions & 0 deletions x-pack/qa/full-cluster-restart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask

apply plugin: 'elasticsearch.internal-java-rest-test'
Expand All @@ -28,3 +29,10 @@ buildParams.bwcVersions.withIndexCompatible { bwcVersion, baseName ->
maxParallelForks = 1
}
}

tasks.register("bcUpgradeTest", StandaloneRestIntegTestTask) {
// We use a phony version here as the real version is provided via `tests.bwc.main.version` system property
usesBwcDistribution(Version.fromString("0.0.0"))
systemProperty("tests.old_cluster_version", "0.0.0")
onlyIf("tests.bwc.main.version system property exists") { System.getProperty("tests.bwc.main.version") != null }
}