|
|
|
@ -62,6 +62,7 @@ Assert-Equals -actual $actual -expected $true
|
|
|
|
|
|
|
|
|
|
# Test-AnsiblePath Normal file
|
|
|
|
|
$actual = Test-AnsiblePath -Path C:\Windows\System32\kernel32.dll
|
|
|
|
|
Assert-Equals -actual $actual -expected $true
|
|
|
|
|
|
|
|
|
|
# Test-AnsiblePath fails with wildcard
|
|
|
|
|
$failed = $false
|
|
|
|
@ -73,6 +74,18 @@ try {
|
|
|
|
|
}
|
|
|
|
|
Assert-Equals -actual $failed -expected $true
|
|
|
|
|
|
|
|
|
|
# Test-AnsiblePath on non file PS Provider object
|
|
|
|
|
$actual = Test-AnsiblePath -Path Cert:\LocalMachine\My
|
|
|
|
|
Assert-Equals -actual $actual -expected $true
|
|
|
|
|
|
|
|
|
|
# Test-AnsiblePath on environment variable
|
|
|
|
|
$actual = Test-AnsiblePath -Path env:SystemDrive
|
|
|
|
|
Assert-Equals -actual $actual -expected $true
|
|
|
|
|
|
|
|
|
|
# Test-AnsiblePath on environment variable that does not exist
|
|
|
|
|
$actual = Test-AnsiblePath -Path env:FakeEnvValue
|
|
|
|
|
Assert-Equals -actual $actual -expected $false
|
|
|
|
|
|
|
|
|
|
# Get-AnsibleItem doesn't exist with -ErrorAction SilentlyContinue param
|
|
|
|
|
$actual = Get-AnsibleItem -Path C:\fakefile -ErrorAction SilentlyContinue
|
|
|
|
|
Assert-Equals -actual $actual -expected $null
|
|
|
|
|