[java-identity-provider] branch main updated: Move new module tests to idp-admin-api.

Scott Cantor cantor.2 at osu.edu
Tue Sep 1 21:44:13 UTC 2020


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

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

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

The following commit(s) were added to refs/heads/main by this push:
       new  a4f2b2276 Move new module tests to idp-admin-api.
a4f2b2276 is described below

commit a4f2b22766ad8a7388b21515e193bdf989acb3c2
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Sep 1 17:44:04 2020 -0400

    Move new module tests to idp-admin-api.
---
 .../net/shibboleth/idp/module}/IdPModuleTest.java  |  8 ++---
 .../net/shibboleth/idp/module}/TestModule.java     |  5 +--
 .../services/net.shibboleth.idp.module.IdPModule   |  3 ++
 .../net/shibboleth/idp/module/module.properties    | 25 ++++++++++++++
 .../net/shibboleth/idp/module/impl/BadModule.java  | 40 ----------------------
 .../net/shibboleth/idp/module/impl/BadModule2.java | 40 ----------------------
 .../services/net.shibboleth.idp.module.IdPModule   |  3 --
 .../shibboleth/idp/module/impl/module.properties   | 25 --------------
 8 files changed, 32 insertions(+), 117 deletions(-)

diff --git a/idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/IdPModuleTest.java b/idp-admin-api/src/test/java/net/shibboleth/idp/module/IdPModuleTest.java
similarity index 94%
rename from idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/IdPModuleTest.java
rename to idp-admin-api/src/test/java/net/shibboleth/idp/module/IdPModuleTest.java
index 633a51eb8..b267e4393 100644
--- a/idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/IdPModuleTest.java
+++ b/idp-admin-api/src/test/java/net/shibboleth/idp/module/IdPModuleTest.java
@@ -1,4 +1,4 @@
-package net.shibboleth.idp.module.impl;
+package net.shibboleth.idp.module;
 /*
  * Licensed to the University Corporation for Advanced Internet Development,
  * Inc. (UCAID) under one or more contributor license agreements.  See the
@@ -26,9 +26,7 @@ import java.util.ServiceLoader.Provider;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import net.shibboleth.idp.module.IdPModule;
 import net.shibboleth.idp.module.IdPModule.ModuleResource;
-import net.shibboleth.idp.module.ModuleException;
 
 /**
  * Unit tests exercising module code.
@@ -54,11 +52,11 @@ public class IdPModuleTest {
         Assert.assertEquals(module.getResources().size(), 2);
         
         ModuleResource resource = resources.next();
-        Assert.assertEquals(resource.getSource(), "net/shibboleth/idp/module/impl/test.xml");
+        Assert.assertEquals(resource.getSource(), "net/shibboleth/idp/module/test.xml");
         Assert.assertEquals(resource.getDestination(), Path.of("conf/test.xml"));
         
         resource = resources.next();
-        Assert.assertEquals(resource.getSource(), "net/shibboleth/idp/module/impl/test.vm");
+        Assert.assertEquals(resource.getSource(), "net/shibboleth/idp/module/test.vm");
         Assert.assertEquals(resource.getDestination(), Path.of("views/test.vm"));
     }
 
diff --git a/idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/TestModule.java b/idp-admin-api/src/test/java/net/shibboleth/idp/module/TestModule.java
similarity index 88%
rename from idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/TestModule.java
rename to idp-admin-api/src/test/java/net/shibboleth/idp/module/TestModule.java
index e1e65d77a..5429d798c 100644
--- a/idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/TestModule.java
+++ b/idp-admin-api/src/test/java/net/shibboleth/idp/module/TestModule.java
@@ -15,13 +15,10 @@
  * limitations under the License.
  */
 
-package net.shibboleth.idp.module.impl;
+package net.shibboleth.idp.module;
 
 import java.io.IOException;
 
-import net.shibboleth.idp.module.ModuleException;
-import net.shibboleth.idp.module.PropertyDrivenIdPModule;
-
 /**
  * Test {@IdPModule} implementation.
  */
diff --git a/idp-admin-api/src/test/resources/META-INF/services/net.shibboleth.idp.module.IdPModule b/idp-admin-api/src/test/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
new file mode 100644
index 000000000..f7453d5ca
--- /dev/null
+++ b/idp-admin-api/src/test/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
@@ -0,0 +1,3 @@
+net.shibboleth.idp.module.TestModule
+net.shibboleth.idp.module.BadModule
+net.shibboleth.idp.module.BadModule2
diff --git a/idp-admin-api/src/test/resources/net/shibboleth/idp/module/module.properties b/idp-admin-api/src/test/resources/net/shibboleth/idp/module/module.properties
new file mode 100644
index 000000000..50a9c3209
--- /dev/null
+++ b/idp-admin-api/src/test/resources/net/shibboleth/idp/module/module.properties
@@ -0,0 +1,25 @@
+# Unit test modules
+
+# Main test module
+
+net.shibboleth.idp.module.TestModule.name = Test module
+net.shibboleth.idp.module.TestModule.desc = Module for unit tests
+net.shibboleth.idp.module.TestModule.url = https://wiki.shibboleth.net/confluence/display/IDP4/Home
+
+net.shibboleth.idp.module.TestModule.1.src = net/shibboleth/idp/module/test.xml
+net.shibboleth.idp.module.TestModule.1.dest = conf/test.xml
+
+net.shibboleth.idp.module.TestModule.2.src = net/shibboleth/idp/module/test.vm
+net.shibboleth.idp.module.TestModule.2.dest = views/test.vm
+
+# Broken modules due to dangerous resources
+
+net.shibboleth.idp.module.BadModule.name = Bad module
+net.shibboleth.idp.module.BadModule.desc = Module for unit tests with error
+net.shibboleth.idp.module.BadModule.1.src = net/shibboleth/idp/module/test.xml
+net.shibboleth.idp.module.BadModule.1.dest = ../conf/test.xml
+
+net.shibboleth.idp.module.BadModule2.name = Bad module 2
+net.shibboleth.idp.module.BadModule2.desc = Module for unit tests with error
+net.shibboleth.idp.module.BadModule2.1.src = net/shibboleth/idp/module/test.xml
+net.shibboleth.idp.module.BadModule2.1.dest = /conf/test.xml
diff --git a/idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/BadModule.java b/idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/BadModule.java
deleted file mode 100644
index 8c7857051..000000000
--- a/idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/BadModule.java
+++ /dev/null
@@ -1,40 +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.module.impl;
-
-import java.io.IOException;
-
-import net.shibboleth.idp.module.ModuleException;
-import net.shibboleth.idp.module.PropertyDrivenIdPModule;
-
-/**
- * Test {@IdPModule} implementation.
- */
-public final class BadModule extends PropertyDrivenIdPModule {
-
-    /**
-     * Constructor.
-     *  
-     * @throws ModuleException 
-     * @throws IOException
-     */
-    public BadModule() throws IOException, ModuleException {
-        super(BadModule.class);
-    }
-
-}
\ No newline at end of file
diff --git a/idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/BadModule2.java b/idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/BadModule2.java
deleted file mode 100644
index a9f45aad5..000000000
--- a/idp-conf-impl/src/test/java/net/shibboleth/idp/module/impl/BadModule2.java
+++ /dev/null
@@ -1,40 +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.module.impl;
-
-import java.io.IOException;
-
-import net.shibboleth.idp.module.ModuleException;
-import net.shibboleth.idp.module.PropertyDrivenIdPModule;
-
-/**
- * Test {@IdPModule} implementation.
- */
-public final class BadModule2 extends PropertyDrivenIdPModule {
-
-    /**
-     * Constructor.
-     *  
-     * @throws ModuleException 
-     * @throws IOException
-     */
-    public BadModule2() throws IOException, ModuleException {
-        super(BadModule2.class);
-    }
-
-}
\ No newline at end of file
diff --git a/idp-conf-impl/src/test/resources/META-INF/services/net.shibboleth.idp.module.IdPModule b/idp-conf-impl/src/test/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
deleted file mode 100644
index 5a9d19fb3..000000000
--- a/idp-conf-impl/src/test/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
+++ /dev/null
@@ -1,3 +0,0 @@
-net.shibboleth.idp.module.impl.TestModule
-net.shibboleth.idp.module.impl.BadModule
-net.shibboleth.idp.module.impl.BadModule2
diff --git a/idp-conf-impl/src/test/resources/net/shibboleth/idp/module/impl/module.properties b/idp-conf-impl/src/test/resources/net/shibboleth/idp/module/impl/module.properties
deleted file mode 100644
index 7ef368c67..000000000
--- a/idp-conf-impl/src/test/resources/net/shibboleth/idp/module/impl/module.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-# Unit test modules
-
-# Main test module
-
-net.shibboleth.idp.module.impl.TestModule.name = Test module
-net.shibboleth.idp.module.impl.TestModule.desc = Module for unit tests
-net.shibboleth.idp.module.impl.TestModule.url = https://wiki.shibboleth.net/confluence/display/IDP4/Home
-
-net.shibboleth.idp.module.impl.TestModule.1.src = net/shibboleth/idp/module/impl/test.xml
-net.shibboleth.idp.module.impl.TestModule.1.dest = conf/test.xml
-
-net.shibboleth.idp.module.impl.TestModule.2.src = net/shibboleth/idp/module/impl/test.vm
-net.shibboleth.idp.module.impl.TestModule.2.dest = views/test.vm
-
-# Broken modules due to dangerous resources
-
-net.shibboleth.idp.module.impl.BadModule.name = Bad module
-net.shibboleth.idp.module.impl.BadModule.desc = Module for unit tests with error
-net.shibboleth.idp.module.impl.BadModule.1.src = net/shibboleth/idp/module/impl/test.xml
-net.shibboleth.idp.module.impl.BadModule.1.dest = ../conf/test.xml
-
-net.shibboleth.idp.module.impl.BadModule2.name = Bad module 2
-net.shibboleth.idp.module.impl.BadModule2.desc = Module for unit tests with error
-net.shibboleth.idp.module.impl.BadModule2.1.src = net/shibboleth/idp/module/impl/test.xml
-net.shibboleth.idp.module.impl.BadModule2.1.dest = /conf/test.xml

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


More information about the commits mailing list