Revision 3896dfc6eefbdf5ac8d9a5abc72b24bfac7b99c7 authored by James Rodewig on 12 August 2020, 17:06:25 UTC, committed by James Rodewig on 12 August 2020, 17:06:25 UTC
1 parent cca7ccb
Raw File
build.gradle
import org.elasticsearch.gradle.test.RestIntegTestTask
import org.elasticsearch.gradle.testclusters.TestClustersPlugin

subprojects { Project subproj ->
  subproj.tasks.withType(RestIntegTestTask) {
    if (subproj.extensions.findByName("${it.name}Cluster")) {
      subproj.extensions.configure("${it.name}Cluster") { cluster ->
        cluster.distribution = System.getProperty('tests.distribution', 'oss')
      }
    }
  }
  plugins.withType(TestClustersPlugin).whenPluginAdded {
    testClusters.all {
      String configuredTestDistribution = System.getProperty('tests.distribution', 'oss').toUpperCase()
      testDistribution = configuredTestDistribution
      if (configuredTestDistribution.equals("DEFAULT")) {
        setting "xpack.security.enabled", "false"
      }
    }
  }
}
back to top