From eee6b43216015cf7db9825b60c3c5f35d624c203 Mon Sep 17 00:00:00 2001 From: John McCrae Date: Fri, 24 Jun 2022 09:41:47 -0700 Subject: Refactored tests for older Windows versions Signed-off-by: John McCrae --- spec/integration/client/client_spec.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'spec') diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb index 3fa2e608e1..1bd84fa940 100644 --- a/spec/integration/client/client_spec.rb +++ b/spec/integration/client/client_spec.rb @@ -73,12 +73,7 @@ describe "chef-client" do def verify_export_password_exists powershell_exec! <<~EOH Try { - if (-not (($PSVersionTable.PSVersion.Major -ge 5) -and ($PSVersionTable.PSVersion.Build -ge 22000)) ) { - $response = Get-ItemProperty -Path "HKLM:\\Software\\Progress\\Authentication" -Name "PfxPass" -ErrorAction Stop - } - else { - $response = Get-ItemPropertyValue -Path "HKLM:\\Software\\Progress\\Authentication" -Name "PfxPass" -ErrorAction Stop - } + $response = Get-ItemProperty -Path "HKLM:\\Software\\Progress\\Authentication" -Name "PfxPass" -ErrorAction Stop if ($response) {return $true} } Catch { -- cgit v1.2.1