Publish preview version #42

Merged
OCram85 merged 25 commits from dev into master 2019-04-04 17:02:18 +02:00
Showing only changes of commit 8bc8135775 - Show all commits

View File

@ -76,26 +76,23 @@ Describe "New-CredentialStore" {
} }
Context "Tests for Windows certificate store" { Context "Tests for Windows certificate store" {
It "Create new private store and skip certificate linking" { It "Create new private store and skip certificate linking" {
if (! $isLinux) { { New-CredentialStore -UseCertStore -Force } | Should -Not -Throw
{ New-CredentialStore -UseCertStore -Force } | Should -Not -Throw $CS = Get-CredentialStore
$CS = Get-CredentialStore $CS.PfxCertificate | Should -Be $null
$CS.PfxCertificate | Should -Be $null $CS.Thumbprint | Should -Not -Be $null
$CS.Thumbprint | Should -Not -Be $null $res = Test-CSCertificate -Thumbprint $CS.Thumbprint -StoreName My -StoreLocation CurrentUser
} Write-Verbose -Message ('res: {0}' -f $res) -Verbose
else { $res | Should -Be $true
{ New-CredentialStore -UseCertStore -Force } | Should -Throw
}
} }
It "Create new shared store and skipt certificate linking" { It "Create new shared store and skipt certificate linking" {
if (! $isLinux) { { New-CredentialStore -Shared -UseCertStore -Force } | Should -Not -Throw
{ New-CredentialStore -Shared -UseCertStore -Force } | Should -Not -Throw $CS = Get-CredentialStore -Shared
$CS = Get-CredentialStore -Shared $CS.PfxCertificate | Should -Be $null
$CS.PfxCertificate | Should -Be $null $CS.Thumbprint | Should -Not -Be $null
$CS.Thumbprint | Should -Not -Be $null Test-CSCertificate -Thumbprint $CS.Thumbprint -StoreName My -StoreLocation CurrentUser
} Write-Verbose -Message ('res: {0}' -f $res) -Verbose
else { $res | Should -Be $true
{ New-CredentialStore -Shared -UseCertStore -Force } | Should -Throw
}
} }
} }
} }