-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #560 from tejasdrolia/BEE-52993
Added validation for useHttp flag to fix the non FIPS compliant TLS usage.
- Loading branch information
Showing
3 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...java/io/jenkins/plugins/artifact_manager_jclouds/s3/S3BlobStoreConfigFipsEnabledTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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 hudson.util.FormValidation; | ||
import static org.junit.Assert.assertEquals; | ||
import jenkins.security.FIPS140; | ||
|
||
|
||
public class S3BlobStoreConfigFipsEnabledTest { | ||
|
||
@ClassRule | ||
public static FlagRule<String> fipsFlag = FlagRule.systemProperty(FIPS140.class.getName() + ".COMPLIANCE", "true"); | ||
|
||
@Rule | ||
public JenkinsRule j = new JenkinsRule(); | ||
|
||
@Test | ||
public void checkValidationUseHttpsWithFipsEnabled() { | ||
S3BlobStoreConfig descriptor = S3BlobStoreConfig.get(); | ||
assertEquals(descriptor.doCheckUseHttp(true).kind , FormValidation.Kind.ERROR); | ||
assertEquals(descriptor.doCheckUseHttp(false).kind , FormValidation.Kind.OK); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters