Always test against default distribution when in a FIPS JVM (#51273)

(cherry picked from commit e34d7fdaf7b511627c64a9e16805fd82f980b8c6)
This commit is contained in:
Mark Vieira 2020-01-22 11:01:19 -08:00
parent ec47698f7c
commit c5a032b594
No known key found for this signature in database
GPG Key ID: CA947EF7E6D4B105
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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