[java-idp-plugin-duo] branch main updated: IDP-1679 Remove plugin State test https://issues.shibboleth.net/jira/browse/IDP-1679

Rod Widdowson rdw at steadingsoftware.com
Sun Sep 20 15:12:21 UTC 2020


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

rdw pushed a commit to branch main
in repository java-idp-plugin-duo.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-duo.git;a=commit;h=8bc885aa4a373076077620057d2ebcba931d38e7

The following commit(s) were added to refs/heads/main by this push:
       new  8bc885a   IDP-1679 Remove plugin State test https://issues.shibboleth.net/jira/browse/IDP-1679
8bc885a is described below

commit 8bc885aa4a373076077620057d2ebcba931d38e7
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sun Sep 20 15:39:34 2020 +0100

    IDP-1679 Remove plugin State test
    https://issues.shibboleth.net/jira/browse/IDP-1679
---
 idp-duo-impl/pom.xml                               |   5 -
 .../idp/plugin/authn/duo/PluginTest.java           | 107 ---------------------
 .../idp/plugin/authn/duo/package-info.java         |  19 ----
 3 files changed, 131 deletions(-)

diff --git a/idp-duo-impl/pom.xml b/idp-duo-impl/pom.xml
index 383a0d1..6a973d8 100644
--- a/idp-duo-impl/pom.xml
+++ b/idp-duo-impl/pom.xml
@@ -103,11 +103,6 @@
             <groupId>${spring.groupId}</groupId>
             <artifactId>spring-test</artifactId>
             <scope>test</scope>
-        </dependency> 
-        <dependency>
-            <groupId>${idp.groupId}</groupId>
-            <artifactId>idp-admin-impl</artifactId>
-            <scope>test</scope>
         </dependency>      
         <dependency>
             <groupId>net.shibboleth.idp</groupId>
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
deleted file mode 100644
index 0e5dcac..0000000
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/PluginTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements.  See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.shibboleth.idp.plugin.authn.duo;
-
-import org.testng.annotations.Test;
-
-import net.shibboleth.idp.plugin.PluginDescription;
-import net.shibboleth.idp.plugin.PluginSupport.SupportLevel;
-import net.shibboleth.idp.plugin.PluginVersion;
-import net.shibboleth.idp.plugin.impl.PluginState;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
-import net.shibboleth.utilities.java.support.primitive.StringSupport;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.Properties;
-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. */
-    private PluginDescription duo;
-
-    /**
-     * Find the plugin.
-     */
-    @BeforeClass
-    public void setupPlugin() {
-
-        final ServiceLoader<PluginDescription> loader = ServiceLoader.load(PluginDescription.class);
-        for (final PluginDescription service : loader) {
-            if ("net.shibboleth.idp.plugin.duo".contentEquals(service.getPluginId())) {
-                duo = service;
-                break;
-            }
-        }
-        assertNotNull(duo);
-
-    }
-    
-    /**
-     * Test files.
-     * 
-     * @throws IOException on error
-     */
-    @Test
-    public void testFiles() throws IOException {
-        final Path distDir = Path.of("../idp-duo-distribution/src/main/resources");
-        assertTrue(Files.exists(distDir));
-        for (final Path p : duo.getFilePathsToCopy()) {
-            assertTrue(Files.exists(distDir.resolve(p)));
-        }
-        final File propFile = distDir.resolve("bootstrap").resolve("id.property").toFile();
-        assertTrue(propFile.exists());
-        Properties props = new Properties(2);           
-        try(final BufferedInputStream stream = new BufferedInputStream(new FileInputStream(propFile))) {
-            props.load(stream);
-            assertEquals(StringSupport.trimOrNull(props.getProperty("pluginid")), duo.getPluginId());
-        }
-    }
-
-    /**
-     * Test the plugin state.
-     * 
-     * @throws ComponentInitializationException on error
-     */
-    @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")));
-    }
-
-}
diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/package-info.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/package-info.java
deleted file mode 100644
index 8315aff..0000000
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/package-info.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements.  See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/** Duo OIDC 2FA login flow test classes. */
-package net.shibboleth.idp.plugin.authn.duo;

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


More information about the commits mailing list