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
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,16 @@ Describe "Test-Connection" -tags "CI" {
{ $result = Test-Connection "fakeHost" -Count 1 -Quiet -ErrorAction Stop } |
Should -Throw -ErrorId "TestConnectionException,Microsoft.PowerShell.Commands.TestConnectionCommand"
# Error code = 11001 - Host not found.
if (!$IsWindows) {
$error[0].Exception.InnerException.ErrorCode | Should -Be -131073
} else {
$error[0].Exception.InnerException.ErrorCode | Should -Be 11001
if ((Get-PlatformInfo) -match "raspbian") {
$code = 11
}
elseif (!$IsWindows) {
$code = -131073
}
else {
$code = 11001
}
$error[0].Exception.InnerException.ErrorCode | Should -Be $code
}

# In VSTS, address is 0.0.0.0
Expand Down Expand Up @@ -262,7 +267,7 @@ Describe "Test-Connection" -tags "CI" {
}

It "Quiet works" {
$result = Test-Connection $hostName -TraceRoute -Quiet
$result = Test-Connection localhost -TraceRoute -Quiet

$result | Should -BeTrue
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Describe "DSC MOF Compilation" -tags "CI" {
}

BeforeAll {
$IsAlpine = (Get-PlatformInfo) -eq "alpine"
$SkipAdditionalPlatforms = (Get-PlatformInfo) -match "alpine|raspbian"
Import-Module PSDesiredStateConfiguration
$dscModule = Get-Module PSDesiredStateConfiguration
$baseSchemaPath = Join-Path $dscModule.ModuleBase 'Configuration'
Expand All @@ -21,7 +21,7 @@ Describe "DSC MOF Compilation" -tags "CI" {
$env:PSModulePath = join-path ([io.path]::GetDirectoryName($powershellexe)) Modules
}

It "Should be able to compile a MOF from a basic configuration" -Skip:($IsMacOS -or $IsWindows -or $IsAlpine) {
It "Should be able to compile a MOF from a basic configuration" -Skip:($IsMacOS -or $IsWindows -or $SkipAdditionalPlatforms) {
[Scriptblock]::Create(@"
configuration DSCTestConfig
{
Expand All @@ -40,7 +40,7 @@ Describe "DSC MOF Compilation" -tags "CI" {
"TestDrive:\DscTestConfig1\localhost.mof" | Should -Exist
}

It "Should be able to compile a MOF from another basic configuration" -Skip:($IsMacOS -or $IsWindows -or $IsAlpine) {
It "Should be able to compile a MOF from another basic configuration" -Skip:($IsMacOS -or $IsWindows -or $SkipAdditionalPlatforms) {
[Scriptblock]::Create(@"
configuration DSCTestConfig
{
Expand All @@ -62,7 +62,7 @@ Describe "DSC MOF Compilation" -tags "CI" {
"TestDrive:\DscTestConfig2\localhost.mof" | Should -Exist
}

It "Should be able to compile a MOF from a complex configuration" -Skip:($IsMacOS -or $IsWindows -or $IsAlpine) {
It "Should be able to compile a MOF from a complex configuration" -Skip:($IsMacOS -or $IsWindows -or $SkipAdditionalPlatforms) {
[Scriptblock]::Create(@"
Configuration WordPressServer{

Expand Down Expand Up @@ -171,7 +171,7 @@ Describe "DSC MOF Compilation" -tags "CI" {
"TestDrive:\DscTestConfig3\CentOS.mof" | Should -Exist
}

It "Should be able to compile a MOF from a basic configuration on Windows" -Skip:($IsMacOS -or $IsLinux -or $IsAlpine) {
It "Should be able to compile a MOF from a basic configuration on Windows" -Skip:($IsMacOS -or $IsLinux -or $SkipAdditionalPlatforms) {
[Scriptblock]::Create(@"
configuration DSCTestConfig
{
Expand All @@ -191,7 +191,7 @@ Describe "DSC MOF Compilation" -tags "CI" {
"TestDrive:\DscTestConfig4\localhost.mof" | Should -Exist
}

It "Should be able to compile a MOF from a configuration with multiple resources on Windows" -Skip:($IsMacOS -or $IsLinux -or $IsAlpine) {
It "Should be able to compile a MOF from a configuration with multiple resources on Windows" -Skip:($IsMacOS -or $IsLinux -or $SkipAdditionalPlatforms) {
[Scriptblock]::Create(@"
configuration DSCTestConfig
{
Expand Down