Skip to content

Commit

Permalink
Add assertions and explicit configuration to junit test
Browse files Browse the repository at this point in the history
Currently the tests in the build are not executed for the junit
container, the testproject is only compiled because an execution is
missing.

This adds the missing execution and an assertion that ensures the tests
are run.

(cherry picked from commit d3aeec7)
  • Loading branch information
laeubi committed Jul 19, 2023
1 parent ff39c6e commit 14139cc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
<version>3.0.0-M5</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>surefire-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
<version>3.0.0-M5</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>surefire-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ public void testJUnit4Container() throws Exception {
Verifier verifier = getVerifier("compiler.junitcontainer/junit4-in-bundle", true);
verifier.executeGoal("test");
verifier.verifyErrorFreeLog();
verifier.verifyTextInLog("Tests run: 5, Failures: 0, Errors: 0, Skipped: 0");
}

@Test
public void testJUnit4ContainerWithDependencies() throws Exception {
Verifier verifier = getVerifier("compiler.junitcontainer/junit4-in-bundle-with-dependencies", true);
verifier.executeGoal("test");
verifier.verifyErrorFreeLog();
verifier.verifyTextInLog("Tests run: 5, Failures: 0, Errors: 0, Skipped: 0");
}

@Test
Expand Down

0 comments on commit 14139cc

Please sign in to comment.