Porting Management DRT TTests from psl-monad to Pester
This commit is contained in:
parent
613d9c3cad
commit
54efb3cb52
@ -31,7 +31,7 @@ Describe "Add-Content cmdlet tests" {
|
||||
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 903880)]
|
||||
{add-content -path $() -value "ShouldNotWorkBecausePathIsInvalid" -ea stop} | Should Throw "Cannot bind argument to parameter 'Path'"
|
||||
}
|
||||
It "should throw 'PSNotSupportedException' when you add-content to an unsupported provider" {
|
||||
It "should throw 'PSNotSupportedException' when you add-content to an unsupported provider" -Skip:($IsLinux -Or $IsOSX) {
|
||||
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 906022)]
|
||||
{add-content -path HKLM:\\software\\microsoft -value "ShouldNotWorkBecausePathIsUnsupported" -ea stop} | Should Throw "IContentCmdletProvider interface is not implemented"
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ Describe "Clear-Content cmdlet tests" {
|
||||
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 903880)]
|
||||
{clear-content -path $() -ea stop} | Should Throw "Cannot bind argument to parameter 'Path'"
|
||||
}
|
||||
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" {
|
||||
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" -Skip:($IsLinux -Or $IsOSX) {
|
||||
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 906022)]
|
||||
{clear-content -path HKLM:\\software\\microsoft -ea stop} | Should Throw "IContentCmdletProvider interface is not implemented"
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ Describe "Get-Content" {
|
||||
Get-Content PATH | Should Be $expectedoutput
|
||||
popd
|
||||
}
|
||||
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" {
|
||||
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" -Skip:($IsLinux -Or $IsOSX) {
|
||||
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 906022)]
|
||||
{get-content -path HKLM:\\software\\microsoft -ea stop} | Should Throw "IContentCmdletProvider interface is not implemented"
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ Describe "Set-Content cmdlet tests" {
|
||||
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 903880)]
|
||||
{set-content -path $() -value "ShouldNotWorkBecausePathIsInvalid" -ea stop} | Should Throw "Cannot bind argument to parameter 'Path'"
|
||||
}
|
||||
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" {
|
||||
It "should throw 'PSNotSupportedException' when you set-content to an unsupported provider" -Skip:($IsLinux -Or $IsOSX) {
|
||||
#[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 906022)]
|
||||
{set-content -path HKLM:\\software\\microsoft -value "ShouldNotWorkBecausePathIsUnsupported" -ea stop} | Should Throw "IContentCmdletProvider interface is not implemented"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user