Skip to content

Commit

Permalink
#1082 Run integration tests with Maven Failsafe Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlietz committed Aug 13, 2023
1 parent 509079e commit 40ff885
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.osgi.framework.ServiceReference;

@RunWith(PaxExam.class)
public abstract class AbstractKarafTestContainerITest {
public abstract class AbstractKarafTestContainerIT {

private final MavenArtifactUrlReference KARAF_URL = maven("org.apache.karaf", "apache-karaf").type("zip");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.ops4j.pax.exam.karaf.container;

public class Karaf3TestContainerITest extends AbstractKarafTestContainerITest {
public class Karaf3TestContainerIT extends AbstractKarafTestContainerIT {

@Override
protected String getDefaultKarafVersion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.*;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel;

public class Karaf4EmbeddedTestContainerITest extends AbstractKarafTestContainerITest {
public class Karaf4EmbeddedTestContainerIT extends AbstractKarafTestContainerIT {

private final MavenArtifactUrlReference KARAF_URL = maven("org.apache.karaf", "apache-karaf").type("zip");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.ops4j.pax.exam.karaf.container;

public class Karaf4TestContainerITest extends AbstractKarafTestContainerITest {
public class Karaf4TestContainerIT extends AbstractKarafTestContainerIT {

@Override
protected String getDefaultKarafVersion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,12 @@

import static org.junit.Assert.assertNotNull;

import javax.inject.Inject;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;

@RunWith(PaxExam.class)
public class ValidateDefaultJUnitBundles extends Karaf4TestContainerITest {
public class ValidateDefaultJUnitBundles extends Karaf4TestContainerIT {

@Test
public void testDefaultJUnitBundlesPresent() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.osgi.framework.Bundle;

@RunWith(PaxExam.class)
public class ValidateOverridingJUnitBundles extends Karaf4TestContainerITest {
public class ValidateOverridingJUnitBundles extends Karaf4TestContainerIT {

@Override
@Configuration
Expand Down
17 changes: 16 additions & 1 deletion pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,22 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
Expand Down

0 comments on commit 40ff885

Please sign in to comment.