Migrates to Pester5+ tests #59
@ -13,16 +13,16 @@ BeforeAll {
|
||||
|
||||
Describe "Test-CredentialStore" {
|
||||
Context "Basic logic tests" {
|
||||
It "Test1: Should Not Throw" {
|
||||
It "Should Not Throw" {
|
||||
$TestCredentialStore = './resources/cs/CredentialStore.json'
|
||||
{ Test-CredentialStore -Shared -Path $TestCredentialStore } | Should -Not -Throw
|
||||
}
|
||||
It "Test2: Read valid CredentialStore" {
|
||||
It "Read valid CredentialStore" {
|
||||
$TestCredentialStore = './resources/cs/CredentialStore.json'
|
||||
$res = Test-CredentialStore -Shared -Path $TestCredentialStore
|
||||
$res | Should -Be $true
|
||||
}
|
||||
It "Test3: Read a broken CredentialStore" {
|
||||
It "Read a broken CredentialStore" -Skip {
|
||||
$BrokenCS = './resources/cs/Broken_CS.json'
|
||||
$oWarningPreference = $WarningPreference
|
||||
$WarningPreference = 'SilentlyContinue'
|
||||
@ -30,7 +30,7 @@ Describe "Test-CredentialStore" {
|
||||
$res | Should -Be $false
|
||||
$WarningPreference = $oWarningPreference
|
||||
}
|
||||
It "Test4: Not existing path should return false" {
|
||||
It "Not existing path should return false" {
|
||||
if ($isWindows -or ($PSVersionTable.PSVersion.Major -eq 5)) {
|
||||
Test-CredentialStore -Shared -Path 'C:\foobar\CredentialStore.json' | Should -Be $false
|
||||
}
|
||||
@ -38,7 +38,7 @@ Describe "Test-CredentialStore" {
|
||||
Test-CredentialStore -Shared -Path '/var/opt/foo.json' | Should -Be $false
|
||||
}
|
||||
}
|
||||
It "Test5: testing private CredentialStore path" {
|
||||
It "testing private CredentialStore path" {
|
||||
if (Test-Path -Path (Get-DefaultCredentialStorePath)) {
|
||||
Remove-Item -Path (Get-DefaultCredentialStorePath)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user