Skip to content
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

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

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 }
}
2 changes: 1 addition & 1 deletion modules/ingest-geoip/qa/full-cluster-restart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask

apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.bwc-test'

apply plugin: 'elasticsearch.bc-upgrade-test'

dependencies {
javaRestTestImplementation project(':test:fixtures:geoip-fixture')
Expand Down
1 change: 1 addition & 0 deletions qa/full-cluster-restart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask
apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.internal-test-artifact'
apply plugin: 'elasticsearch.bwc-test'
apply plugin: 'elasticsearch.bc-upgrade-test'

buildParams.bwcVersions.withIndexCompatible { bwcVersion, baseName ->
tasks.register(bwcTaskName(bwcVersion), StandaloneRestIntegTestTask) {
Expand Down
13 changes: 1 addition & 12 deletions qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.internal-test-artifact-base'
apply plugin: 'elasticsearch.bwc-test'
apply plugin: 'elasticsearch.fwc-test'
apply plugin: 'elasticsearch.bc-upgrade-test'

testArtifacts {
registerTestArtifactFromSourceSet(sourceSets.javaRestTest)
Expand All @@ -26,18 +27,6 @@ buildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
}
}

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 }
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 {
// CI doesn't like it when there's multiple clusters running at once
maxParallelForks = 1
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask

apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.bwc-test'

apply plugin: 'elasticsearch.bc-upgrade-test'

dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugin/esql/qa/server/mixed-cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.internal-yaml-rest-test'
apply plugin: 'elasticsearch.internal-test-artifact'
apply plugin: 'elasticsearch.bwc-test'
apply plugin: 'elasticsearch.bc-upgrade-test'
apply plugin: org.elasticsearch.gradle.internal.precommit.CheckstylePrecommitPlugin
apply plugin: org.elasticsearch.gradle.internal.precommit.ForbiddenApisPrecommitPlugin
apply plugin: org.elasticsearch.gradle.internal.precommit.ForbiddenPatternsPrecommitPlugin
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugin/inference/qa/mixed-cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask
apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.internal-test-artifact-base'
apply plugin: 'elasticsearch.bwc-test'
apply plugin: 'elasticsearch.bc-upgrade-test'

dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
Expand All @@ -37,4 +38,3 @@ buildParams.bwcVersions.withWireCompatible(supportedVersion) { bwcVersion, baseN
dependsOn javaRestTest
}
}

3 changes: 1 addition & 2 deletions x-pack/plugin/inference/qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask
apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.internal-test-artifact-base'
apply plugin: 'elasticsearch.bwc-test'

apply plugin: 'elasticsearch.bc-upgrade-test'

dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
Expand All @@ -26,4 +26,3 @@ buildParams.bwcVersions.withWireCompatible(v -> v.after("8.11.0")) { bwcVersion,
maxParallelForks = 1
}
}

1 change: 1 addition & 0 deletions x-pack/plugin/security/qa/multi-cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask
apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.rest-resources'
apply plugin: 'elasticsearch.bwc-test'
apply plugin: 'elasticsearch.bc-upgrade-test'

dependencies {
javaRestTestImplementation project(':x-pack:plugin:core')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask

apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.bwc-test'
apply plugin: 'elasticsearch.bc-upgrade-test'

dependencies {
// TODO: Remove core dependency and change tests to not use builders that are part of xpack-core.
Expand Down
1 change: 1 addition & 0 deletions x-pack/qa/full-cluster-restart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask

apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.bwc-test'
apply plugin: 'elasticsearch.bc-upgrade-test'

dependencies {
// TODO: Remove core dependency and change tests to not use builders that are part of xpack-core.
Expand Down