Skip to content

Commit

Permalink
Merge pull request #561 from tejasdrolia/JENKINS-74810
Browse files Browse the repository at this point in the history
[JENKINS-74810] Bom-2.440.x update from version  2779.v391653d9c5da_ to 3435.v238d66a_043fb_
  • Loading branch information
jglick authored Nov 8, 2024
2 parents 49ae5d7 + 7bf9b43 commit 342fb07
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.440.x</artifactId>
<version>2779.v391653d9c5da_</version>
<version>3435.v238d66a_043fb_</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -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<String> 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);
Expand Down

0 comments on commit 342fb07

Please sign in to comment.