diff --git a/pom.xml b/pom.xml index 6be41a5a..3dec9f2a 100644 --- a/pom.xml +++ b/pom.xml @@ -266,7 +266,7 @@ io.jenkins.tools.bom bom-2.440.x - 2779.v391653d9c5da_ + 3435.v238d66a_043fb_ import pom diff --git a/src/test/java/io/jenkins/plugins/artifact_manager_jclouds/s3/S3BlobStoreConfigFipsEnabledTest.java b/src/test/java/io/jenkins/plugins/artifact_manager_jclouds/s3/S3BlobStoreConfigFipsEnabledTest.java index f06cd4c2..2e009670 100644 --- a/src/test/java/io/jenkins/plugins/artifact_manager_jclouds/s3/S3BlobStoreConfigFipsEnabledTest.java +++ b/src/test/java/io/jenkins/plugins/artifact_manager_jclouds/s3/S3BlobStoreConfigFipsEnabledTest.java @@ -1,25 +1,28 @@ package io.jenkins.plugins.artifact_manager_jclouds.s3; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; -import org.jvnet.hudson.test.FlagRule; import org.jvnet.hudson.test.JenkinsRule; +import org.jvnet.hudson.test.RealJenkinsRule; import hudson.util.FormValidation; import static org.junit.Assert.assertEquals; -import jenkins.security.FIPS140; +import java.io.IOException; -public class S3BlobStoreConfigFipsEnabledTest { - @ClassRule - public static FlagRule fipsFlag = FlagRule.systemProperty(FIPS140.class.getName() + ".COMPLIANCE", "true"); +public class S3BlobStoreConfigFipsEnabledTest { @Rule - public JenkinsRule j = new JenkinsRule(); + public RealJenkinsRule rule = new RealJenkinsRule().omitPlugins("eddsa-api").javaOptions("-Djenkins.security.FIPS140.COMPLIANCE=true"); + @Test - public void checkValidationUseHttpsWithFipsEnabled() { + public void checkUseHttpsWithFipsEnabledTest() throws Throwable { + rule.then(S3BlobStoreConfigFipsEnabledTest::checkUseHttpsWithFipsEnabled); + } + + + private static void checkUseHttpsWithFipsEnabled(JenkinsRule r) throws IOException { S3BlobStoreConfig descriptor = S3BlobStoreConfig.get(); assertEquals(descriptor.doCheckUseHttp(true).kind , FormValidation.Kind.ERROR); assertEquals(descriptor.doCheckUseHttp(false).kind , FormValidation.Kind.OK);