Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
taoliult committed Oct 29, 2024
1 parent 12964c1 commit 3503dca
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 499 deletions.
32 changes: 14 additions & 18 deletions closed/test/jdk/openj9/internal/security/TestProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private static Stream<Arguments> patternMatches_expectedExitValue1() {
System.getProperty("test.src") + "/property-java.security",
"The property names: RestrictedSecurity.Test-Profile.Extended_2.jce.providerWrongTypo " +
"in profile RestrictedSecurity.Test-Profile.Extended_2 \\(or a base profile\\) are not recognized"),
// 4 - Test profile - profile not exist (NEED TO CHECK)
// 4 - Test profile - profile not exist
Arguments.of("Test-Profile-NotExist.Base",
System.getProperty("test.src") + "/property-java.security",
"Test-Profile.NotExist.Base is not present in the java.security file."),
Expand Down Expand Up @@ -102,57 +102,53 @@ private static Stream<Arguments> patternMatches_expectedExitValue1() {
// 13 - Test property - property does not exist in parent profile, cannot append
Arguments.of("Test-Profile-SetProperty.Extension_2",
System.getProperty("test.src") + "/property-java.security",
"Property \\'jdkTlsDisabledNamedCurves\\' does not exist in parent profile. Cannot append"),
// 14 - Test property - property does not exist in parent profile, cannot remove (NEED TO CHECK)
"Property \\'jdkTlsDisabledNamedCurves\\' does not exist in parent profile or java.security file. Cannot append"),
// 14 - Test property - property value is not in existing values
Arguments.of("Test-Profile-SetProperty.Extension_3",
System.getProperty("test.src") + "/property-java.security",
"Property \\'jdkTlsLegacyAlgorithms\\' does not exist in parent profile. Cannot remove"),
// 15 - Test property - property value is not in existing values
Arguments.of("Test-Profile-SetProperty.Extension_4",
System.getProperty("test.src") + "/property-java.security",
"Value \\'TestDisabledlgorithms\\' is not in existing values"),
// 16 - Test property - policy sunset (NEED TO CHECK)
// 15 - Test property - policy sunset
Arguments.of("Test-Profile-PolicySunset.Base",
System.getProperty("test.src") + "/property-java.security",
"Restricted security policy expired"),
// 17 - Test property - policy sunset format
// 16 - Test property - policy sunset format
Arguments.of("Test-Profile-PolicySunsetFormat.Base",
System.getProperty("test.src") + "/property-java.security",
"Restricted security policy sunset date is incorrect, the correct format is yyyy-MM-dd"),
// 18 - Test property - secure random check 1
// 17 - Test property - secure random check 1
Arguments.of("Test-Profile-SecureRandomCheck_1",
System.getProperty("test.src") + "/property-java.security",
"Restricted security mode secure random is missing"),
// 19 - Test property - secure random check 2
// 18 - Test property - secure random check 2
Arguments.of("Test-Profile-SecureRandomCheck_2",
System.getProperty("test.src") + "/property-java.security",
"Restricted security mode secure random is missing"),
// 20 - Test constraint - constraint check 1
// 19 - Test constraint - constraint check 1
Arguments.of("Test-Profile-Constraint_1",
System.getProperty("test.src") + "/property-java.security",
"Provider format is incorrect"),
// 21 - Test constraint - constraint check 2
// 20 - Test constraint - constraint check 2
Arguments.of("Test-Profile-Constraint_2",
System.getProperty("test.src") + "/property-java.security",
"Incorrect constraint definition for provider"),
// 22 - Test constraint - constraint check 3
// 21 - Test constraint - constraint check 3
Arguments.of("Test-Profile-Constraint_3",
System.getProperty("test.src") + "/property-java.security",
"Incorrect constraint definition for provider"),
// 23 - Test constraint - constraint attributes check
// 22 - Test constraint - constraint attributes check
Arguments.of("Test-Profile-Constraint_Attributes",
System.getProperty("test.src") + "/property-java.security",
"Constraint attributes format is incorrect"),
// 24 - Test constraint - constraint changed 1
// 23 - Test constraint - constraint changed 1
Arguments.of("Test-Profile-ConstraintChanged_1.Extension",
System.getProperty("test.src") + "/property-java.security",
"Cannot append or remove constraints since the provider (.*?) " +
"wasn't in this position in the profile extended"),
// 25 - Test constraint - constraint changed 2
// 24 - Test constraint - constraint changed 2
Arguments.of("Test-Profile-ConstraintChanged_2.Extension",
System.getProperty("test.src") + "/property-java.security",
"Constraint (.*?)is not part of existing constraints"),
// 26 - Test constraint - constraint changed 3
// 25 - Test constraint - constraint changed 3
Arguments.of("Test-Profile-ConstraintChanged_3.Base",
System.getProperty("test.src") + "/property-java.security",
"You cannot add or remove to provider (.*?). This is the base profile.")
Expand Down
Loading

0 comments on commit 3503dca

Please sign in to comment.