[java-idp-integration-tests] branch master updated: IDP-1044 - Start testbed before the IdP when using Jetty

Tom Zeller tzeller at dragonacea.biz
Fri Sep 16 14:02:52 EDT 2016


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

tzeller pushed a commit to branch master
in repository java-idp-integration-tests.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=044f52ebfda8e1ec335264df5d2094354b2c8ab0

The following commit(s) were added to refs/heads/master by this push:
       new  044f52e   IDP-1044 - Start testbed before the IdP when using Jetty
044f52e is described below

commit 044f52ebfda8e1ec335264df5d2094354b2c8ab0
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Fri Sep 16 12:57:31 2016 -0500

    IDP-1044 - Start testbed before the IdP when using Jetty
    
    See https://dev.eclipse.org/mhonarc/lists/jetty-users/msg05277.html
---
 pom.xml                                                      |  2 +-
 .../java/net/shibboleth/idp/test/JettyServerProcess.java     | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index bda975c..e9b3572 100644
--- a/pom.xml
+++ b/pom.xml
@@ -528,7 +528,7 @@
                                             <version>${testbed.version}</version>
                                             <type>jar</type>
                                             <classifier>${testbed.classifier}</classifier>
-                                            <includes>webapps/0-idp-testbed.xml</includes>
+                                            <includes>etc/testbed.xml</includes>
                                         </artifactItem>
                                     </artifactItems>
                                     <outputDirectory>${test-distributions.directory}/shibboleth-identity-provider-${idp.version}/jetty-base/</outputDirectory>
diff --git a/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java b/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java
index c88a986..a9088bb 100644
--- a/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java
+++ b/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java
@@ -17,9 +17,12 @@
 
 package net.shibboleth.idp.test;
 
+import java.io.IOException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import org.testng.Assert;
+
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 
 /** Start Jetty via start.jar. */
@@ -33,6 +36,15 @@ public class JettyServerProcess extends AbstractServerProcess {
         // Add JETTY_BASE to environment
         getProcessBuilder().environment().put("JETTY_BASE", getServletContainerBasePath().toAbsolutePath().toString());
 
+        // Add testbed webapp
+        final Path startIni = getServletContainerBasePath().resolve("start.ini");
+        Assert.assertTrue(startIni.toAbsolutePath().toFile().exists(), "Path to start.ini not found");
+        try {
+            BaseIntegrationTest.replaceFile(startIni, "\\Z", System.lineSeparator() + "testbed.xml");
+        } catch (IOException e) {
+            throw new ComponentInitializationException(e);
+        }
+
         // Start Jetty via start.jar
         final Path pathToJava = Paths.get(System.getProperty("java.home"), "bin", "java");
         getCommands().add(pathToJava.toAbsolutePath().toString());

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


More information about the commits mailing list