Skip to content

Commit

Permalink
Always test against default distribution when in a FIPS JVM (#51273)
Browse files Browse the repository at this point in the history
(cherry picked from commit e34d7fd)
  • Loading branch information
mark-vieira committed Jan 22, 2020
1 parent da2277e commit 6379899
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion plugins/examples/painless-whitelist/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -33,7 +35,9 @@ dependencies {
}

testClusters.integTest {
testDistribution = 'oss'
rootProject.globalInfo.ready {
testDistribution = BuildParams.inFipsJvm ? 'DEFAULT' : 'OSS'
}
}

test.enabled = false

0 comments on commit 6379899

Please sign in to comment.