[java-idp-integration-tests] branch main updated: Fix tests by enabling Consent module.

Tom Zeller tzeller at dragonacea.biz
Fri Oct 2 16:16:01 UTC 2020


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

tzeller pushed a commit to branch main
in repository java-idp-integration-tests.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=9fd6db47ef7ccf36cbd6bc39424935f10faa3252

The following commit(s) were added to refs/heads/main by this push:
       new  9fd6db4   Fix tests by enabling Consent module.
9fd6db4 is described below

commit 9fd6db47ef7ccf36cbd6bc39424935f10faa3252
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Fri Oct 2 11:15:45 2020 -0500

    Fix tests by enabling Consent module.
    
    
    Enable modules on per-test IdP home rather than distribution.
    
    Do not enable modules when the IdP to be tested is V3.
    
    Add trace logging of module loading and enabling.
---
 .../java/net/shibboleth/idp/test/BaseIntegrationTest.java   | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
index f3220f2..641e8fa 100644
--- a/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
@@ -398,8 +398,6 @@ public abstract class BaseIntegrationTest
             log.error("Unable to determine version of IdP");
         }
 
-        enableModules(Collections.singletonList("idp.authn.Password"), pathToDistIdPHome);
-        
         // Path to per-test idp.home
         final String timestamp = DateTimeFormatter.ofPattern(idpHomePattern).format(LocalDateTime.now());
         pathToIdPHome = pathToDistIdPHome.getParent().resolve(timestamp);
@@ -432,6 +430,10 @@ public abstract class BaseIntegrationTest
             // Classpath messages.properties
             messagesPropertiesResource = new ClassPathResource("/net/shibboleth/idp/messages/messages.properties");
             Assert.assertTrue(messagesPropertiesResource.exists(), "Classpath resource messages.properties not found");
+            
+            // Enable modules
+            enableModules(Collections.singletonList("idp.authn.Password"), pathToIdPHome);
+            enableModules(Collections.singletonList("idp.intercept.Consent"), pathToIdPHome);
         }
         log.debug("Path to message properties '{}'", messagesPropertiesResource);
     }
@@ -446,11 +448,14 @@ public abstract class BaseIntegrationTest
      */
     protected void enableModules(@Nonnull @NonnullElements final Collection<String> modules,
             @Nonnull final Path idpHome) throws ModuleException {
-        
+
         final ModuleContext context = new ModuleContext(idpHome);
-        
+        log.trace("Module context {}", context);
+
         for (final IdPModule module : ServiceLoader.load(IdPModule.class)) {
+            log.trace("Found module {}", module);
             if (modules.contains(module.getId())) {
+                log.trace("Enabling module {}", module);
                 module.enable(context);
             }
         }

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


More information about the commits mailing list