[java-idp-plugin-duo] branch master updated: Fix plugin test for upstream change
Phil Smart
philip.smart at jisc.ac.uk
Wed Aug 5 12:51:52 UTC 2020
This is an automated email from the git hooks/post-receive script.
philsmart pushed a commit to branch master
in repository java-idp-plugin-duo.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-duo.git;a=commit;h=9b3ed1a7669031bfb92cd22afae650c7e2ab76f1
The following commit(s) were added to refs/heads/master by this push:
new 9b3ed1a Fix plugin test for upstream change
9b3ed1a is described below
commit 9b3ed1a7669031bfb92cd22afae650c7e2ab76f1
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Wed Aug 5 13:51:47 2020 +0100
Fix plugin test for upstream change
---
.../idp/plugin/authn/duo/PluginTest.java | 33 ++++++++++++----------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/PluginTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/PluginTest.java
index 90ea0e3..9df36f0 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/PluginTest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/PluginTest.java
@@ -34,18 +34,18 @@ import java.util.ServiceLoader;
import org.testng.annotations.BeforeClass;
-
/** Test the plugin description. If nothing else, it ensures the plugin has the correct basic setup. */
public class PluginTest {
-
- /** The plugin to test.*/
+
+ /** The plugin to test. */
private PluginDescription duo;
/**
* Find the plugin.
*/
- @BeforeClass public void beforeMethod() {
-
+ @BeforeClass
+ public void beforeMethod() {
+
final ServiceLoader<PluginDescription> loader = ServiceLoader.load(PluginDescription.class);
for (final PluginDescription service : loader) {
if ("net.shibboleth.idp.plugin.authn.duo".contentEquals(service.getPluginId())) {
@@ -54,18 +54,21 @@ public class PluginTest {
}
}
assertNotNull(duo);
-
+
}
- /** Test the plugin state.*/
- @Test public void testState() throws ComponentInitializationException {
- final PluginState state = new PluginState(duo);
- state.initialize();
- assertTrue(state.getAvailableVersions().contains(
- new PluginVersion(duo.getMajorVersion(),duo.getMinorVersion(), duo.getPatchVersion())));
- assertEquals(state.getSupportLevel(), SupportLevel.Current);
- assertTrue(state.isSupportedWithIdPVersion("4.1.0"));
- assertFalse(state.isSupportedWithIdPVersion("5.0.0"));
+ /** Test the plugin state. */
+ @Test
+ public void testState() throws ComponentInitializationException {
+
+ final PluginState state = new PluginState(duo);
+ state.initialize();
+ final PluginVersion version =
+ new PluginVersion(duo.getMajorVersion(), duo.getMinorVersion(), duo.getPatchVersion());
+ assertTrue(state.getAvailableVersions().containsKey(version));
+ assertEquals(state.getCurrentInfo().getSupportLevel(), SupportLevel.Current);
+ assertTrue(state.isSupportedWithIdPVersion(version, new PluginVersion("4.1.0")));
+ assertFalse(state.isSupportedWithIdPVersion(version, new PluginVersion("5.0.0")));
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list