Issue #1743 Support both unit and integration tests
Signed-off-by: Jan Bartel <janb@webtide.com>
This commit is contained in:
parent
747315d3dc
commit
c50c70ac02
|
@ -19,7 +19,9 @@
|
|||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<excludes>
|
||||
<exclude>**/IntegrationTest*.java</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
|
|
@ -49,6 +49,9 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>IntegrationTest*.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<helloServlet>true</helloServlet>
|
||||
|
|
|
@ -12,6 +12,6 @@ s.close()
|
|||
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Forked process starting' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'helloServlet')
|
||||
|
||||
|
|
|
@ -66,6 +66,9 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>IntegrationTest*.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<pingServlet>true</pingServlet>
|
||||
|
|
|
@ -13,6 +13,6 @@ s.close()
|
|||
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Distro process starting' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'pingServlet ok')
|
||||
assert buildLog.text.contains( 'helloServlet')
|
||||
|
|
|
@ -66,6 +66,9 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>IntegrationTest*.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<pingServlet>true</pingServlet>
|
||||
|
|
|
@ -14,6 +14,6 @@ s.close()
|
|||
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Forked process starting' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'pingServlet ok')
|
||||
assert buildLog.text.contains( 'helloServlet')
|
||||
|
|
|
@ -72,6 +72,9 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>IntegrationTest*.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<contentCheck>Please enter your name</contentCheck>
|
||||
|
|
|
@ -18,5 +18,5 @@
|
|||
*/
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Started Server' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'contentCheck')
|
||||
|
|
|
@ -64,6 +64,9 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>IntegrationTest*.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<pingServlet>true</pingServlet>
|
||||
|
|
|
@ -18,6 +18,6 @@
|
|||
*/
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Started Server' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'pingServlet ok')
|
||||
assert buildLog.text.contains( 'helloServlet')
|
||||
|
|
|
@ -68,6 +68,9 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>IntegrationTest*.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<jetty.port.file>${jetty.port.file}</jetty.port.file>
|
||||
<pingServlet>true</pingServlet>
|
||||
|
|
|
@ -18,6 +18,6 @@
|
|||
*/
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Distro process starting' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'pingServlet ok')
|
||||
assert buildLog.text.contains( 'helloServlet')
|
||||
|
|
|
@ -18,6 +18,6 @@
|
|||
*/
|
||||
File outputLog = new File( basedir, 'build.log' )
|
||||
assert outputLog.text.contains( 'Forked process starting' )
|
||||
assert outputLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert outputLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert outputLog.text.contains( 'pingServlet ok')
|
||||
assert outputLog.text.contains( 'helloServlet')
|
||||
|
|
|
@ -18,5 +18,5 @@
|
|||
*/
|
||||
File buildLog = new File( basedir, 'build.log' )
|
||||
assert buildLog.text.contains( 'Started Server' )
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.TestGetContent')
|
||||
assert buildLog.text.contains( 'Running org.eclipse.jetty.maven.plugin.it.IntegrationTestGetContent')
|
||||
assert buildLog.text.contains( 'contentCheck')
|
||||
|
|
|
@ -41,7 +41,7 @@ import org.junit.jupiter.api.Test;
|
|||
public class TestJettyEmbedder
|
||||
{
|
||||
|
||||
//@Test
|
||||
@Test
|
||||
public void testJettyEmbedderFromDefaults()
|
||||
throws Exception
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
/**
|
||||
*
|
||||
*/
|
||||
public class TestGetContent
|
||||
public class IntegrationTestGetContent
|
||||
{
|
||||
@Test
|
||||
public void get_content_response()
|
Loading…
Reference in New Issue