[java-identity-provider] branch main updated: Refresh paths for plugin tests
Rod Widdowson
rdw at steadingsoftware.com
Thu Nov 26 13:50:36 UTC 2020
This is an automated email from the git hooks/post-receive script.
rdw 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=283d72914b0dfc1d0a48faee160dce72be2b7cf6
The following commit(s) were added to refs/heads/main by this push:
new 283d72914 Refresh paths for plugin tests
283d72914 is described below
commit 283d72914b0dfc1d0a48faee160dce72be2b7cf6
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Nov 26 13:48:08 2020 +0000
Refresh paths for plugin tests
Align tests to use rhino version 0.1.4. Enable all the CLI
tests, leaving the straight installer tests (which are really
there for research reasons only) disabled
---
.../idp/installer/plugin/impl/PluginCLITest.java | 54 +++++++++++-----------
.../installer/plugin/impl/PluginInstallerTest.java | 10 ++--
2 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginCLITest.java b/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginCLITest.java
index 69c62776c..a1d7f22ff 100644
--- a/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginCLITest.java
+++ b/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginCLITest.java
@@ -40,42 +40,56 @@ import net.shibboleth.utilities.java.support.httpclient.HttpClientBuilder;
@SuppressWarnings("javadoc")
public class PluginCLITest extends BasePluginTest {
- private final String PLUGIN_DISTRO = "https://build.shibboleth.net/nexus/service/local/repositories/releases/content/net/shibboleth/idp/plugin/authn/idp-plugin-totp-dist/0.0.2/idp-plugin-totp-dist-0.0.2.tar.gz";
+ private final String PLUGIN_DISTRO = "https://build.shibboleth.net/nexus/service/local/repositories/releases/content/net/shibboleth/idp/plugin/scripting/idp-plugin-rhino-dist/0.1.4/idp-plugin-rhino-dist-0.1.4.tar.gz";
- private final String PLUGIN_ID = "net.shibboleth.idp.plugin.authn.totp";
+ private final String PLUGIN_ID = "net.shibboleth.idp.plugin.rhino";
@BeforeSuite public void setUp() throws IOException
{
System.setProperty("idp.home",getIdpHome().toString());
+ final Path credentials = getIdpHome().resolve("credentials").resolve(PLUGIN_ID);
+ Files.createDirectories(credentials);
+ //
+ // Populate the new key store
+ //
+ final Path trustStorePath = credentials.resolve("truststore.asc");
+ final Resource from = new ClassPathResource("credentials/truststore.asc");
+ try (final InputStream in = from.getInputStream();
+ final OutputStream out = new ProgressReportingOutputStream(new FileOutputStream(trustStorePath.toFile(), true))) {
+ in.transferTo(out);
+ }
}
- @Test(enabled = false) public void testLicense() {
+ @Test(enabled = true) public void testLicense() {
assertEquals(PluginInstallerCLI.runMain(new String[] { "--license", "net.shibboleth.plugin.test"} ), AbstractCommandLine.RC_OK);
}
- @Test(enabled = false) public void testList() throws IOException {
+ @Test(enabled = true) public void testList() throws IOException {
assertEquals(PluginInstallerCLI.runMain(new String[] { "-fl", } ), AbstractCommandLine.RC_OK);
}
- @Test(enabled = false) public void testWrong() {
+ @Test(enabled = true) public void testWrong() {
assertEquals(PluginInstallerCLI.runMain(new String[] { "-i", "a"}), AbstractCommandLine.RC_INIT);
}
- @Test(enabled = false, dependsOnMethods = {"testLocal"}) public void testWeb() {
+ @Test(enabled = true) public void testWeb() {
assertEquals(PluginInstallerCLI.runMain(new String[] {
"-i", PLUGIN_DISTRO,
+ "--noCheck",
}),
AbstractCommandLine.RC_OK);
}
- @Test(enabled = false, dependsOnMethods = {"testWeb"})
+ @Test(enabled = true, dependsOnMethods = {"testWeb"})
public void testUpdate() {
assertEquals(PluginInstallerCLI.runMain(new String[] {
- "-u", PLUGIN_ID}),
+ "-u", PLUGIN_ID,
+ "--noCheck",
+ }),
AbstractCommandLine.RC_OK);
}
- @Test(enabled = false, dependsOnMethods = {"testUpdate"})
+ @Test(enabled = true, dependsOnMethods = {"testUpdate"})
public void testForceUpdate() {
assertEquals(PluginInstallerCLI.runMain(new String[] {
"-u", PLUGIN_ID,
@@ -83,7 +97,7 @@ public class PluginCLITest extends BasePluginTest {
AbstractCommandLine.RC_OK);
}
- @Test(enabled = false, dependsOnMethods = {"testForceUpdate"})
+ @Test(enabled = true, dependsOnMethods = {"testForceUpdate"})
public void testListContents() {
assertEquals(PluginInstallerCLI.runMain(new String[] {
"-cl", PLUGIN_ID,
@@ -91,7 +105,7 @@ public class PluginCLITest extends BasePluginTest {
AbstractCommandLine.RC_OK);
}
- @Test(enabled = false, dependsOnMethods = {"testListContents"}, ignoreMissingDependencies = true)
+ @Test(enabled = true, dependsOnMethods = {"testListContents"}, ignoreMissingDependencies = true)
public void testUninstall() {
assertEquals(PluginInstallerCLI.runMain(new String[] {
"-r", PLUGIN_ID,
@@ -99,7 +113,7 @@ public class PluginCLITest extends BasePluginTest {
AbstractCommandLine.RC_OK);
}
- @Test(enabled = false) public void testLocal() throws Exception {
+ @Test(enabled = true) public void testLocal() throws Exception {
Path unpack = null;
try {
Resource from;
@@ -116,23 +130,9 @@ public class PluginCLITest extends BasePluginTest {
in.transferTo(out);
}
- final Path credentials = getIdpHome().resolve("credentials").resolve(PLUGIN_ID);
- Files.createDirectories(credentials);
- //
- // Populate the new key store
- //
- final Path trustStorePath = credentials.resolve("truststore.asc");
- from = new ClassPathResource("credentials/truststore.asc");
- try (final InputStream in = from.getInputStream();
- final OutputStream out = new ProgressReportingOutputStream(new FileOutputStream(trustStorePath.toFile(), true))) {
- in.transferTo(out);
- }
- //
- // try again
- //
assertEquals(PluginInstallerCLI.runMain(new String[] {
"-i", unpack.resolve("local.tar.gz").toString(),
- // "-p", "net.shibboleth.idp.plugin.authn.totp"
+ "--noCheck",
}),
AbstractCommandLine.RC_OK);
} finally {
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 7ae8aabdb..2aca2e01e 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
@@ -85,9 +85,9 @@ public class PluginInstallerTest extends BasePluginTest {
inst.setIdpHome(getIdpHome());
inst.setAcceptKey(loggingAcceptCert);
inst.initialize();
- final URL where = new URL("https://build.shibboleth.net/nexus/service/local/repositories/releases/content/net/shibboleth/idp/plugin/scripting/idp-plugin-nashorn-dist/0.1.0/");
+ final URL where = new URL("https://build.shibboleth.net/nexus/service/local/repositories/releases/content/net/shibboleth/idp/plugin/scripting/idp-plugin-nashorn-dist/0.1.4/");
inst.setPluginId("net.shibboleth.idp.plugin.nashorn");
- inst.installPlugin(where,"idp-plugin-nashorn-dist-0.1.0.zip", false);
+ inst.installPlugin(where,"idp-plugin-nashorn-dist-0.1.4.zip", false);
}
}
@@ -97,7 +97,7 @@ public class PluginInstallerTest extends BasePluginTest {
inst.setAcceptKey(loggingAcceptCert);
inst.initialize();
final Path dir = Path.of("H:\\Perforce\\Juno\\New\\plugins\\java-idp-plugin-scripting\\rhino-dist\\target");
- inst.installPlugin(dir,"shibboleth-idp-plugin-rhino-0.1.4-SNAPSHOT.zip", true);
+ inst.installPlugin(dir,"shibboleth-idp-plugin-rhino-0.1.4-SNAPSHOT.zip", false);
}
}
@@ -108,8 +108,8 @@ public class PluginInstallerTest extends BasePluginTest {
inst.setIdpHome(getIdpHome());
inst.setAcceptKey(loggingAcceptCert);
inst.initialize();
- final URL where = new URL("https://build.shibboleth.net/nexus/service/local/repositories/releases/content/net/shibboleth/idp/plugin/scripting/idp-plugin-rhino-dist/0.1.0/");
- inst.installPlugin(where,"idp-plugin-rhino-dist-0.1.0.zip", true);
+ final URL where = new URL("https://build.shibboleth.net/nexus/service/local/repositories/releases/content/net/shibboleth/idp/plugin/scripting/idp-plugin-rhino-dist/0.1.4/");
+ inst.installPlugin(where,"idp-plugin-rhino-dist-0.1.4.tgz", false);
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list