From 5ff6c70e9871ac552d969c9678a493a6b818c2d4 Mon Sep 17 00:00:00 2001 From: kalgiz Date: Tue, 10 Apr 2018 17:33:12 -0700 Subject: [PATCH 1/2] New Pester syntax for PSDesiredStateConfiguration module. --- .../MOF-Compilation.Tests.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 b/test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 index 32215a217af..40c4484b526 100644 --- a/test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 +++ b/test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 @@ -29,7 +29,7 @@ Describe "DSC MOF Compilation" -tags "CI" { DSCTestConfig -OutputPath TestDrive:\DscTestConfig1 "@) | should not throw - "TestDrive:\DscTestConfig1\localhost.mof" | Should Exist + "TestDrive:\DscTestConfig1\localhost.mof" | Should -Exist } It "Should be able to compile a MOF from another basic configuration" -Skip:($IsMacOS -or $IsWindows) { @@ -51,7 +51,7 @@ Describe "DSC MOF Compilation" -tags "CI" { DSCTestConfig -OutputPath TestDrive:\DscTestConfig2 "@) | should not throw - "TestDrive:\DscTestConfig2\localhost.mof" | Should Exist + "TestDrive:\DscTestConfig2\localhost.mof" | Should -Exist } It "Should be able to compile a MOF from a complex configuration" -Skip:($IsMacOS -or $IsWindows) { @@ -160,7 +160,7 @@ Describe "DSC MOF Compilation" -tags "CI" { WordPressServer -OutputPath TestDrive:\DscTestConfig3 "@) | should not throw - "TestDrive:\DscTestConfig3\CentOS.mof" | Should Exist + "TestDrive:\DscTestConfig3\CentOS.mof" | Should -Exist } It "Should be able to compile a MOF from a basic configuration on Windows" -Skip:($IsMacOS -or $IsLinux) { @@ -180,7 +180,7 @@ Describe "DSC MOF Compilation" -tags "CI" { DSCTestConfig -OutputPath TestDrive:\DscTestConfig4 "@) | should not throw - "TestDrive:\DscTestConfig4\localhost.mof" | Should Exist + "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) { @@ -210,6 +210,6 @@ Describe "DSC MOF Compilation" -tags "CI" { DSCTestConfig -OutputPath TestDrive:\DscTestConfig5 "@) | should not throw - "TestDrive:\DscTestConfig5\localhost.mof" | Should Exist + "TestDrive:\DscTestConfig5\localhost.mof" | Should -Exist } } From 4b31994ec48b35d4c845429a221a83e6268aab08 Mon Sep 17 00:00:00 2001 From: kalgiz Date: Tue, 10 Apr 2018 17:40:23 -0700 Subject: [PATCH 2/2] Test correction --- .../MOF-Compilation.Tests.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 b/test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 index 40c4484b526..9f20cdad24f 100644 --- a/test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 +++ b/test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 @@ -27,7 +27,7 @@ Describe "DSC MOF Compilation" -tags "CI" { } DSCTestConfig -OutputPath TestDrive:\DscTestConfig1 -"@) | should not throw +"@) | Should -Not -Throw "TestDrive:\DscTestConfig1\localhost.mof" | Should -Exist } @@ -49,7 +49,7 @@ Describe "DSC MOF Compilation" -tags "CI" { } DSCTestConfig -OutputPath TestDrive:\DscTestConfig2 -"@) | should not throw +"@) | Should -Not -Throw "TestDrive:\DscTestConfig2\localhost.mof" | Should -Exist } @@ -158,7 +158,7 @@ Describe "DSC MOF Compilation" -tags "CI" { } WordPressServer -OutputPath TestDrive:\DscTestConfig3 -"@) | should not throw +"@) | Should -Not -Throw "TestDrive:\DscTestConfig3\CentOS.mof" | Should -Exist } @@ -178,7 +178,7 @@ Describe "DSC MOF Compilation" -tags "CI" { } DSCTestConfig -OutputPath TestDrive:\DscTestConfig4 -"@) | should not throw +"@) | Should -Not -Throw "TestDrive:\DscTestConfig4\localhost.mof" | Should -Exist } @@ -208,7 +208,7 @@ Describe "DSC MOF Compilation" -tags "CI" { } DSCTestConfig -OutputPath TestDrive:\DscTestConfig5 -"@) | should not throw +"@) | Should -Not -Throw "TestDrive:\DscTestConfig5\localhost.mof" | Should -Exist }