diff options
Diffstat (limited to 'spec/integration/client/client_spec.rb')
-rw-r--r-- | spec/integration/client/client_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb index d2b79edf05..1bd84fa940 100644 --- a/spec/integration/client/client_spec.rb +++ b/spec/integration/client/client_spec.rb @@ -38,7 +38,7 @@ describe "chef-client" do def install_certificate_in_store(client_name) if ChefUtils.windows? powershell_exec! <<~EOH - if (-not ($PSVersionTable.PSVersion.Major -ge 5)) { + if (-not (($PSVersionTable.PSVersion.Major -ge 5) -and ($PSVersionTable.PSVersion.Build -ge 22000)) ) { New-SelfSignedCertificate -CertStoreLocation Cert:\\LocalMachine\\My -DnsName "#{client_name}" } else { @@ -72,13 +72,13 @@ describe "chef-client" do def verify_export_password_exists powershell_exec! <<~EOH - Try { - $response = Get-ItemPropertyValue -Path "HKLM:\\Software\\Progress\\Authentication" -Name "PfxPass" -ErrorAction Stop - if ($response) {return $true} - } - Catch { - return $false + Try { + $response = Get-ItemProperty -Path "HKLM:\\Software\\Progress\\Authentication" -Name "PfxPass" -ErrorAction Stop + if ($response) {return $true} } + Catch { + return $false + } EOH end |