[java-identity-provider] 06/06: Fix regressed test

Rod Widdowson rdw at steadingsoftware.com
Tue Aug 4 13:06:46 UTC 2020


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

rdw pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=033654c1cd6ab719ebc6e319b62f5fb5164ccc03

commit 033654c1cd6ab719ebc6e319b62f5fb5164ccc03
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Aug 4 14:06:34 2020 +0100

    Fix regressed test
---
 .../idp/installer/plugin/impl/PluginInstallerTest.java        | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerTest.java b/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerTest.java
index ae087f472..e4eadbb51 100644
--- a/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerTest.java
+++ b/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerTest.java
@@ -18,6 +18,8 @@
 package net.shibboleth.idp.installer.plugin.impl;
 
 import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertThrows;
+import static org.testng.Assert.assertTrue;
 
 import java.io.IOException;
 import java.net.URL;
@@ -25,7 +27,9 @@ import java.nio.file.Path;
 import java.security.Security;
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 import java.util.function.Predicate;
+import java.util.stream.Collectors;
 
 import org.bouncycastle.jce.provider.BouncyCastleProvider;
 import org.slf4j.Logger;
@@ -69,8 +73,11 @@ public class PluginInstallerTest extends BasePluginTest {
         try (final PluginInstaller inst = new PluginInstaller()) {
             inst.setIdpHome(getIdpHome());
             inst.initialize();
-            List<PluginDescription> plugins = inst.getInstalledPlugins();
-            assertEquals(plugins.get(0).getPluginId(), "org.example.Plugin");
+            final Map<String, Object> result = inst.getInstalledPlugins().stream().collect(Collectors.toMap(PluginDescription::getPluginId,
+                    e->e));
+            
+            assertTrue(result.containsKey("org.example.Plugin"));
+            assertTrue(result.containsKey("net.shibboleth.plugin.test"));
         }
     }
     

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


More information about the commits mailing list