From fdf78adcac4952f59c1b4ea1b4666a0442e5f9b9 Mon Sep 17 00:00:00 2001 From: PaulHigin Date: Thu, 1 Sep 2022 09:06:10 -0700 Subject: [PATCH] Missed one case of hardcoded test passwd. --- test/PSCredentialInfo.Tests.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/PSCredentialInfo.Tests.ps1 b/test/PSCredentialInfo.Tests.ps1 index 8bdcb8daf..20f121adb 100644 --- a/test/PSCredentialInfo.Tests.ps1 +++ b/test/PSCredentialInfo.Tests.ps1 @@ -34,7 +34,8 @@ Describe "Create PSCredentialInfo with VaultName, SecretName, and Credential" -t It "Creates PSCredentialInfo successfully if Credential is non-null and of type PSCredential" { $randomSecret = [System.IO.Path]::GetRandomFileName() - $credential = New-Object System.Management.Automation.PSCredential ("username", (ConvertTo-SecureString "password" -AsPlainText -Force)) + $randomPassword = [System.IO.Path]::GetRandomFileName() + $credential = New-Object System.Management.Automation.PSCredential ("username", (ConvertTo-SecureString $randomPassword -AsPlainText -Force)) $credentialInfo = New-Object Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo ("testvault", $randomSecret, $credential) $credentialInfo.VaultName | Should -Be "testvault"