Always test against default distribution when in a FIPS JVM (#51273)
(cherry picked from commit e34d7fdaf7b511627c64a9e16805fd82f980b8c6)
This commit is contained in:
parent
ec47698f7c
commit
c5a032b594
|
@ -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<Project> {
|
|||
NamedDomainObjectContainer<ElasticsearchCluster> testClusters = project.extensions.findByName(TestClustersPlugin.EXTENSION_NAME) as NamedDomainObjectContainer<ElasticsearchCluster>
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue