Skip to content

Commit

Permalink
Update expected values after adding surefire plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed May 22, 2024
1 parent dbd67ec commit 07525f9
Showing 1 changed file with 49 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,7 @@ void upgradeMavenPluginVersions() {
</project>
""",
spec -> spec.after(actual -> {
List<MatchResult> list = Pattern.compile("<version>(.*)</version>")
.matcher(actual).results().skip(1).toList();
assertThat(list)
.hasSize(2)
.extracting(mr -> mr.group(1))
.allMatch(m -> m.startsWith("3."));
assertThat(Pattern.compile("<version>3\\.(.*)</version>").matcher(actual).results().toList()).hasSize(2);
return actual;
})
)
Expand All @@ -175,6 +170,22 @@ void dontExcludeJunit4DependencyfromTestcontainers() {
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
""";
// Output identical, but we want to make sure we don't exclude junit4 from testcontainers
Expand Down Expand Up @@ -218,6 +229,22 @@ void dontExcludeJunit4DependencyfromSpringBootTestcontainers() {
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
""";
// Output identical, but we want to make sure we don't exclude junit4 from testcontainers
Expand Down Expand Up @@ -371,6 +398,22 @@ void noJunitDependencyIfApiAlreadyPresent() {
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
""")
);
Expand Down

0 comments on commit 07525f9

Please sign in to comment.