[java-idp-integration-tests] 01/02: IDP-1044 - Add testbed to start.ini once per test class

Tom Zeller tzeller at dragonacea.biz
Fri Sep 16 16:37:45 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=28840597fe82a532a0fb61b345d1ef9cc6164e2f

commit 28840597fe82a532a0fb61b345d1ef9cc6164e2f
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Fri Sep 16 15:36:16 2016 -0500

    IDP-1044 - Add testbed to start.ini once per test class
    
    Rather than every time we start Jetty.
---
 .../java/net/shibboleth/idp/test/BaseIntegrationTest.java    |  6 ++++++
 .../java/net/shibboleth/idp/test/JettyServerProcess.java     | 12 ------------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
index 7ff2945..8314e6f 100644
--- a/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
@@ -465,6 +465,12 @@ public abstract class BaseIntegrationTest
 
             // Make tmp directories exist
             Assert.assertTrue(pathToJettyBase.resolve("tmp").toFile().exists(), "Path to jetty.base/tmp/ not found");
+            
+            // Add testbed webapp
+            final Path startIni = pathToJettyBase.resolve("start.ini");
+            log.debug("Path to start.ini '{}'", startIni.toAbsolutePath());
+            Assert.assertTrue(startIni.toAbsolutePath().toFile().exists(), "Path to start.ini not found");
+            replaceFile(startIni, "\\Z", System.lineSeparator() + "testbed.xml");
         }
     }
 
diff --git a/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java b/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java
index a9088bb..c88a986 100644
--- a/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java
+++ b/src/test/java/net/shibboleth/idp/test/JettyServerProcess.java
@@ -17,12 +17,9 @@
 
 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. */
@@ -36,15 +33,6 @@ 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