@@ -76,27 +76,32 @@ private static Stream<Arguments> patternMatches_expectedExitValue0() {
7676 // 1 - expired; supress=false; ignore=true
7777 Arguments .of ("Test-Profile-PolicySunset-Expired" ,
7878 propertyFile ,
79- "false" , "true" ,
79+ "= false" , "= true" ,
8080 "WARNING: java will start with the requested restricted security profile but uncertified cryptography may be active" ),
8181 // 2 - expired; supress=true; ignore=true, no warning
8282 Arguments .of ("Test-Profile-PolicySunset-Expired" ,
8383 propertyFile ,
84- "true" , "true" ,
84+ "= true" , "= true" ,
8585 "" ),
8686 // 3 - expire soon (<=6 months); supress=false
8787 Arguments .of ("Test-Profile-PolicySunset-ExpireSoon" ,
8888 updatedPropertyFile ,
89- "false" , "false" ,
89+ "= false" , "= false" ,
9090 "The restricted security profile RestrictedSecurity.Test-Profile-PolicySunset-ExpireSoon will expire" ),
9191 // 4 - expire soon (<=6 months); supress=true, no warning
9292 Arguments .of ("Test-Profile-PolicySunset-ExpireSoon" ,
9393 updatedPropertyFile ,
94- "true" , "false" ,
94+ "= true" , "= false" ,
9595 "" ),
9696 // 5 - not expire (>6 months); no warning
9797 Arguments .of ("Test-Profile-PolicySunset-NotExpire" ,
9898 propertyFile ,
99- "false" , "false" ,
99+ "=false" , "=false" ,
100+ "" ),
101+ // 6 - expired; property treat empty as true, no warning
102+ Arguments .of ("Test-Profile-PolicySunset-Expired" ,
103+ propertyFile ,
104+ "" , "" ,
100105 "" ));
101106 }
102107
@@ -107,12 +112,12 @@ private static Stream<Arguments> patternMatches_expectedExitValue1() {
107112 // 1 - expired; supress=false; ignore=false
108113 Arguments .of ("Test-Profile-PolicySunset-Expired" ,
109114 propertyFile ,
110- "false" , "false" ,
111- "Use the -Dsemeru.restrictedsecurity.ignoresunsetexpiration to allow java to start while possibly using uncertified cryptography" ),
115+ "= false" , "= false" ,
116+ "Use -Dsemeru.restrictedsecurity.ignoresunsetexpiration to allow java to start while possibly using uncertified cryptography" ),
112117 // 2 - expired; supress=true; ignore=false, no warning
113118 Arguments .of ("Test-Profile-PolicySunset-Expired" ,
114119 propertyFile ,
115- "true" , "false" ,
120+ "= true" , "= false" ,
116121 "" ));
117122 }
118123
@@ -123,8 +128,8 @@ public void shouldContain_expectedExitValue0(String customprofile, String securi
123128 "-Dsemeru.fips=true" ,
124129 "-Dsemeru.customprofile=" + customprofile ,
125130 "-Djava.security.properties=" + securityPropertyFile ,
126- "-Dsemeru.restrictedsecurity.suppresssunsetwarning= " + suppresssunsetwarning ,
127- "-Dsemeru.restrictedsecurity.ignoresunsetexpiration= " + ignoresunsetexpiration ,
131+ "-Dsemeru.restrictedsecurity.suppresssunsetwarning" + suppresssunsetwarning ,
132+ "-Dsemeru.restrictedsecurity.ignoresunsetexpiration" + ignoresunsetexpiration ,
128133 "TestPolicySunset"
129134 );
130135 outputAnalyzer .reportDiagnosticSummary ();
@@ -138,8 +143,8 @@ public void shouldContain_expectedExitValue1(String customprofile, String securi
138143 "-Dsemeru.fips=true" ,
139144 "-Dsemeru.customprofile=" + customprofile ,
140145 "-Djava.security.properties=" + securityPropertyFile ,
141- "-Dsemeru.restrictedsecurity.suppresssunsetwarning= " + suppresssunsetwarning ,
142- "-Dsemeru.restrictedsecurity.ignoresunsetexpiration= " + ignoresunsetexpiration ,
146+ "-Dsemeru.restrictedsecurity.suppresssunsetwarning" + suppresssunsetwarning ,
147+ "-Dsemeru.restrictedsecurity.ignoresunsetexpiration" + ignoresunsetexpiration ,
143148 "TestPolicySunset"
144149 );
145150 outputAnalyzer .reportDiagnosticSummary ();
0 commit comments