minimal tests for defaults

This commit is contained in:
gregw 2024-03-29 18:53:42 +01:00
parent 724ba194cc
commit 210b068bf9
1 changed files with 3 additions and 0 deletions

View File

@ -962,6 +962,7 @@ public class WebAppContextTest
List<String> serverClasses = List.of(context.getHiddenClasses());
assertThat("Should have environment specific test pattern", serverClasses, hasItem(testPattern));
assertThat("Should have pattern from defaults", serverClasses, hasItem("org.eclipse.jetty."));
assertThat("Should have pattern from JaasConfiguration", serverClasses, hasItem("-org.eclipse.jetty.security.jaas."));
for (String defaultServerClass: WebAppClassLoading.DEFAULT_HIDDEN_CLASSES)
assertThat("Should have default patterns", serverClasses, hasItem(defaultServerClass));
@ -989,6 +990,8 @@ public class WebAppContextTest
List<String> systemClasses = List.of(context.getProtectedClasses());
assertThat("Should have environment specific test pattern", systemClasses, hasItem(testPattern));
assertThat("Should have pattern from defaults", systemClasses, hasItem("javax."));
assertThat("Should have pattern from defaults", systemClasses, hasItem("jakarta."));
assertThat("Should have pattern from JaasConfiguration", systemClasses, hasItem("org.eclipse.jetty.security.jaas."));
for (String defaultSystemClass: WebAppClassLoading.DEFAULT_PROTECTED_CLASSES)
assertThat("Should have default patterns", systemClasses, hasItem(defaultSystemClass));