diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 2f7c3af5da3d7..fc853410f746a 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -32,6 +32,7 @@ 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 @@ -159,6 +160,7 @@ class BuildPlugin implements Plugin { for (File dep : project.getConfigurations().getByName("extraJars").getFiles()){ cluster.extraJarFile(dep) } + cluster.setTestDistribution(TestDistribution.DEFAULT) cluster.extraConfigFile("fips_java.security", securityProperties) cluster.extraConfigFile("fips_java.policy", securityPolicy) cluster.extraConfigFile("cacerts.bcfks", bcfksKeystore) diff --git a/plugins/examples/painless-whitelist/build.gradle b/plugins/examples/painless-whitelist/build.gradle index 6b1a78e352f58..3c9368b339e93 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,7 @@ dependencies { } testClusters.integTest { - testDistribution = 'oss' + testDistribution = BuildParams.inFipsJvm ? 'DEFAULT' : 'OSS' } test.enabled = false