Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: bump surefire to 3.x #331

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions tests/maven.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Describe "$SUT_TAG settings.xml is setup" {
It 'sets up settings.xml' {
$exitCode, $stdout, $stderr = Run-Program -Cmd "docker.exe" -Params "run --rm ${SUT_TEST_IMAGE}:${SUT_TAG} Get-Content C:/Users/ContainerUser/.m2/settings.xml"
$exitCode | Should -Be 0
"$PSScriptRoot/settings.xml" | Should -FileContentMatchMultiline $stdout
"$PSScriptRoot/settings.xml" | Should -FileContentMatchMultiline $stdout.Trim()
}
}

Expand All @@ -68,17 +68,21 @@ Describe "$SUT_TAG repository is created" {

Describe "$SUT_TAG run Maven" {
It 'runs maven' {
Run-Program -Cmd "docker.exe" -Params "run --rm ${SUT_TEST_IMAGE}:${SUT_TAG} dir C:/Users/ContainerAdministrator/AppData/Local"
Run-Program -Cmd "docker.exe" -Params "run --rm ${SUT_TEST_IMAGE}:${SUT_TAG} dir C:/Users/ContainerAdministrator/AppData/Local/Temp"
$exitCode, $stdout, $stderr = Run-Program -Cmd "docker.exe" -Params "run --rm ${SUT_TEST_IMAGE}:${SUT_TAG} mvn -B -ntp -f C:/Temp install"
$exitCode | Should -Be 0
}
}

Describe "$SUT_TAG run Surefire" {
It 'runs maven' {
It 'runs surefire' {
Run-Program -Cmd "docker.exe" -Params "run --rm ${SUT_TEST_IMAGE}:${SUT_TAG} dir C:/Users/ContainerAdministrator/AppData/Local"
Run-Program -Cmd "docker.exe" -Params "run --rm ${SUT_TEST_IMAGE}:${SUT_TAG} dir C:/Users/ContainerAdministrator/AppData/Local/Temp"
# -Dplugin='org.apache.maven.plugins:maven-surefire-plugin' works in windowsservercore but not in nanoserver
$exitCode, $stdout, $stderr = Run-Program -Cmd "docker.exe" -Params "run --rm ${SUT_TEST_IMAGE}:${SUT_TAG} mvn -B -ntp -f C:/Temp -Dplugin=surefire help:describe"
$exitCode | Should -Be 0
$stdout | Should -Match "Version: 2.19.1"
$stdout | Should -Match "Version: 3.2.3"
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<version>3.2.3</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
Loading