mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add test for -WhatIf for New-FileCatalog (#8966)
This commit is contained in:
@@ -409,6 +409,12 @@ Describe "Test suite for NewFileCatalogAndTestFileCatalogCmdlets" -Tags "CI" {
|
||||
$result = Test-FileCatalog -Path $testDataPath\UserConfigProv\ -CatalogFilePath $script:catalogPath -FilesToSkip "*.psd1","UserConfigProviderModVersion2.psm1","*ModVersion1.schema.mof"
|
||||
$result | Should -Be "Valid"
|
||||
}
|
||||
|
||||
It "New-FileCatalog -WhatIf does not create file" {
|
||||
$catalogPath = Join-Path "TestDrive:" "TestCatalogWhatIfForNewFileCatalog.cat"
|
||||
New-FileCatalog -CatalogFilePath $catalogPath -WhatIf
|
||||
$catalogPath | Should -Not -Exist
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user