Skip to content
Merged
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
6 changes: 2 additions & 4 deletions docker/tests/container.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ Describe "Linux Containers run PowerShell" -Tags 'Behavior', 'Linux' {
# prune unused volumes
$null=Invoke-Docker -Command 'volume', 'prune' -Params '--force' -SuppressHostOutput
}
BeforeEach
{
BeforeEach {
Remove-Item $testContext.resolvedXmlPath -ErrorAction SilentlyContinue
Remove-Item $testContext.resolvedLogPath -ErrorAction SilentlyContinue
}
Expand All @@ -82,8 +81,7 @@ Describe "Windows Containers run PowerShell" -Tags 'Behavior', 'Windows' {
BeforeAll{
$testContext = Get-TestContext -type Windows
}
BeforeEach
{
BeforeEach {
Remove-Item $testContext.resolvedXmlPath -ErrorAction SilentlyContinue
Remove-Item $testContext.resolvedLogPath -ErrorAction SilentlyContinue
}
Expand Down
22 changes: 21 additions & 1 deletion docker/tests/containerTestCommon.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,27 @@ function Test-SkipWindows

function Test-SkipLinux
{
return !((Get-DockerEngineOs) -like 'Alpine Linux*')
$os = Get-DockerEngineOs

switch -wildcard ($os)
{
'*Linux*' {
return $false
}
'*Mac' {
return $false
}
# Docker for Windows means we are running the linux kernel
'Docker for Windows' {
return $false
}
'Windows*' {
return $true
}
default {
throw "Unknow docker os '$os'"
}
}
}

function Get-TestContext
Expand Down