From 01e8a2f263cf4b662200fb97027af20cec7f2b9a Mon Sep 17 00:00:00 2001 From: OCram85 Date: Fri, 5 Apr 2019 11:29:43 +0200 Subject: [PATCH] fix pester tests --- tests/Store/02_New-CredentialStore.Tests.ps1 | 4 ++-- tests/Store/03_Get-CredentialStore.Tests.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Store/02_New-CredentialStore.Tests.ps1 b/tests/Store/02_New-CredentialStore.Tests.ps1 index a02caa6..ec58d99 100644 --- a/tests/Store/02_New-CredentialStore.Tests.ps1 +++ b/tests/Store/02_New-CredentialStore.Tests.ps1 @@ -80,7 +80,7 @@ Describe "New-CredentialStore" { $CS = Get-CredentialStore $CS.PfxCertificate | Should -Be $null $CS.Thumbprint | Should -Not -Be $null - $res = Test-CSCertificate -Thumbprint $CS.Thumbprint -StoreName My -StoreLocation CurrentUser + $res = Test-CSCertificate -Type Private #Write-Verbose -Message ('res: {0}' -f $res) -Verbose $res | Should -Be $true @@ -90,7 +90,7 @@ Describe "New-CredentialStore" { $CS = Get-CredentialStore -Shared $CS.PfxCertificate | Should -Be $null $CS.Thumbprint | Should -Not -Be $null - $res = Test-CSCertificate -Thumbprint $CS.Thumbprint -StoreName My -StoreLocation LocalMachine + $res = Test-CSCertificate -Type Shared #Write-Verbose -Message ('res: {0}' -f $res) -Verbose $res | Should -Be $true } diff --git a/tests/Store/03_Get-CredentialStore.Tests.ps1 b/tests/Store/03_Get-CredentialStore.Tests.ps1 index a8eabeb..0bf63aa 100644 --- a/tests/Store/03_Get-CredentialStore.Tests.ps1 +++ b/tests/Store/03_Get-CredentialStore.Tests.ps1 @@ -13,11 +13,11 @@ Describe "Get-CredentialStore" { { Get-CredentialStore } | Should -Not -Throw } It "Test2: Read Credential Store with testing data" { - { Use-PfxCertificate -Shared -CredentialStore $TestCredentialStore -Path $TestPfxCert } | Should -Not -Throw + { Use-CSCertificate -Shared -CredentialStore $TestCredentialStore -Path $TestPfxCert } | Should -Not -Throw { Get-CredentialStore -Shared -Path $TestCredentialStore } | Should -Not -Throw } It "Test3: Not existing path should return false" { - { Get-CredentialStore -Shared -Path './CredentialStore.json' }| Should -Throw "Could not find the CredentialStore." + { Get-CredentialStore -Shared -Path './CredentialStore.json' } | Should -Throw "Could not find the CredentialStore." } } Context "Testing invalid json data" {