diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 1129f29b11c..2e4ff69d0e8 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -34,6 +34,8 @@ import org.elasticsearch.gradle.precommit.PrecommitTasks import org.elasticsearch.gradle.test.ErrorReportingTestListener import org.elasticsearch.gradle.testclusters.ElasticsearchCluster import org.elasticsearch.gradle.testclusters.TestClustersPlugin +import org.elasticsearch.gradle.testclusters.TestDistribution +import org.elasticsearch.gradle.tool.Boilerplate import org.gradle.api.Action import org.gradle.api.GradleException import org.gradle.api.InvalidUserDataException @@ -158,6 +160,7 @@ class BuildPlugin implements Plugin { NamedDomainObjectContainer testClusters = project.extensions.findByName(TestClustersPlugin.EXTENSION_NAME) as NamedDomainObjectContainer if (testClusters != null) { testClusters.all { ElasticsearchCluster cluster -> + cluster.setTestDistribution(TestDistribution.DEFAULT) cluster.systemProperty 'javax.net.ssl.trustStorePassword', 'password' cluster.systemProperty 'javax.net.ssl.keyStorePassword', 'password' // Can't use our DiagnosticTrustManager with SunJSSE in FIPS mode diff --git a/plugins/examples/painless-whitelist/build.gradle b/plugins/examples/painless-whitelist/build.gradle index 6b1a78e352f..717b75a57f8 100644 --- a/plugins/examples/painless-whitelist/build.gradle +++ b/plugins/examples/painless-whitelist/build.gradle @@ -16,6 +16,8 @@ * specific language governing permissions and limitations * under the License. */ +import org.elasticsearch.gradle.info.BuildParams + apply plugin: 'elasticsearch.testclusters' apply plugin: 'elasticsearch.esplugin' @@ -33,7 +35,9 @@ dependencies { } testClusters.integTest { - testDistribution = 'oss' + rootProject.globalInfo.ready { + testDistribution = BuildParams.inFipsJvm ? 'DEFAULT' : 'OSS' + } } test.enabled = false