Skip to content

Commit

Permalink
test: in windows run as non admin
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossg committed Feb 13, 2023
1 parent 5d4f7f8 commit 53580a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/maven.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ Describe "$SUT_TAG create test container" {
$exitCode | Should -Be 0
$stdout | Should -Match "Apache Maven $version"
}
It 'runs as non admin user' {
$version = $(Get-Content -Path "$PSScriptRoot/../$SUT_TAG/Dockerfile" | Select-String -Pattern 'ARG MAVEN_VERSION.*' | ForEach-Object { $_ -replace 'ARG MAVEN_VERSION=','' })
$exitCode, $stdout, $stderr = Run-Program -Cmd "docker.exe" -Params "run --rm ${SUT_IMAGE}:${SUT_TAG} echo $env:USERNAME"
$exitCode | Should -Be 0
$stdout | Should -Match "ContainerUser"
}
}

Describe "$SUT_TAG settings.xml is setup" {
Expand Down

0 comments on commit 53580a7

Please sign in to comment.