Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-74810] Bom-2.440.x update from version 2779.v391653d9c5da_ to 3435.v238d66a_043fb_ #561

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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