[java-identity-provider] branch main updated: Adjust test property initializer to allow subclassing by plugins.

Codeberg noreply at shibboleth.net
Fri Nov 21 13:44:12 UTC 2025


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
https://codeberg.org/Shibboleth/java-identity-provider/commit/adf763ef3b37a2688fde2ffef46e0fbfc25ec5a8

The following commit(s) were added to refs/heads/main by this push:
     new adf763ef3 Adjust test property initializer to allow subclassing by plugins.
adf763ef3 is described below

commit adf763ef3b37a2688fde2ffef46e0fbfc25ec5a8
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Nov 21 08:43:25 2025 -0500

    Adjust test property initializer to allow subclassing by plugins.
---
 .../TestEnvironmentApplicationContextInitializer.java | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/idp-conf-impl/src/test/java/net/shibboleth/idp/test/TestEnvironmentApplicationContextInitializer.java b/idp-conf-impl/src/test/java/net/shibboleth/idp/test/TestEnvironmentApplicationContextInitializer.java
index 34fe8dccc..b38051e5f 100644
--- a/idp-conf-impl/src/test/java/net/shibboleth/idp/test/TestEnvironmentApplicationContextInitializer.java
+++ b/idp-conf-impl/src/test/java/net/shibboleth/idp/test/TestEnvironmentApplicationContextInitializer.java
@@ -41,17 +41,28 @@ public class TestEnvironmentApplicationContextInitializer
     /** Class logger. */
     @Nonnull private final Logger log = LoggerFactory.getLogger(TestEnvironmentApplicationContextInitializer.class);
 
-    /** {@inheritDoc} */
-    @Override public void initialize(@Nonnull final ConfigurableApplicationContext applicationContext) {
-        final MockPropertySource mock = new MockPropertySource();
+    /**
+     * Add properties for tests.
+     * 
+     * <p>Subclasses may override this to add their own properties or replace these.</p>
+     * 
+     * @param mock property source
+     */
+    protected void addProperties(@Nonnull final MockPropertySource mock) {
         mock.setProperty("idp.home", "classpath:/net/shibboleth/idp/module");
         mock.setProperty("idp.webflows", "classpath*:/flows");
         mock.setProperty("idp.storage.htmlLocalStorage", "false");
         mock.setProperty("idp.session.trackSPSessions", "false");
         mock.setProperty("idp.session.secondaryServiceIndex", "false");
         mock.setProperty("idp.service.metadata.resources", "testbed.MetadataResolverResources");
+    }
+    
+    /** {@inheritDoc} */
+    @Override public void initialize(@Nonnull final ConfigurableApplicationContext applicationContext) {
+        final MockPropertySource mock = new MockPropertySource();
+        addProperties(mock);
         applicationContext.getEnvironment().getPropertySources().addFirst(mock);
         log.info("Prepending properties '{}'", mock.getSource());
     }
     
-}
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list