forked from OCram85/PSCredentialStore
Marco Blessing
afab3c870c
## About This pull request reflects all changes done in the `linuxsupport` branch. ## Content - Enable PowerShell 6 Core support - Use PFX Certificate for encryption ( fixes #32 ) - Updates CI / CD pipeline ( fixes #31 ) - uses portable libressl ( fixes #34 ) - adds `-PassThru` switch for returning current `VIServer` session in `Connect-To` ( fixes #34 ) - adds git lfs for embedded libressl files - restructured internal functions into `Private` dir - added certificate related functions - adds travis build pipeline for tests
50 lines
1.9 KiB
PowerShell
50 lines
1.9 KiB
PowerShell
Describe "Get-DefaultCredentialStorePath" {
|
|
Context "Basic syntax test" {
|
|
It "Test1: Should not throw" {
|
|
{ Get-DefaultCredentialStorePath } | Should -Not -Throw
|
|
}
|
|
}
|
|
|
|
Context "Private Type" {
|
|
It "Should return correct paths" {
|
|
$Path = Get-DefaultCredentialStorePath
|
|
#Write-Verbose -Message ('Delivered path is: {0}' -f $Path) -Verbose
|
|
if ($Env:APPVEYOR) {
|
|
$PathRef = Join-Path -Path $Env:APPDATA -ChildPath 'CredentialStore.json'
|
|
$Path | Should -Be $PathRef
|
|
}
|
|
elseif ($ENV:TRAVIS) {
|
|
if ($IsLinux) {
|
|
$PathRef = Join-Path -Path $Env:HOME -ChildPath 'CredentialStore.json'
|
|
$Path | Should -Be $PathRef
|
|
}
|
|
elseif ($IsMacOS) {
|
|
$PathRef = Join-Path -Path $Env:HOME -ChildPath 'CredentialStore.json'
|
|
$Path | Should -Be $PathRef
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Context "Shared Type" {
|
|
It "Should return correct paths" {
|
|
$Path = Get-DefaultCredentialStorePath -Shared
|
|
#Write-Verbose -Message ('Delivered path is: {0}' -f $Path) -Verbose
|
|
if ($Env:APPVEYOR) {
|
|
$PathRef = Join-Path -Path $env:ProgramData -ChildPath 'PSCredentialStore/CredentialStore.json'
|
|
$Path | Should -Be $PathRef
|
|
}
|
|
elseif ($ENV:TRAVIS) {
|
|
if ($IsLinux) {
|
|
$PathRef = Join-Path -Path '/var/opt' -ChildPath 'PSCredentialStore/CredentialStore.json'
|
|
$Path | Should -Be $PathRef
|
|
}
|
|
elseif ($IsMacOS) {
|
|
$PathRef = Join-Path -Path '/var/opt' -ChildPath 'PSCredentialStore/CredentialStore.json'
|
|
$Path | Should -Be $PathRef
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|