summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-06-17 10:51:00 -0700
committerJohn McCrae <john.mccrae@progress.com>2022-06-17 10:51:00 -0700
commitc5ee68926f62715939033f70e6db0ec548b66e9c (patch)
tree5a8467df7321af8e6018b99eff4694194044bb6a /spec
parent9894e49919e40798b6830720110fe99166b969bf (diff)
downloadchef-c5ee68926f62715939033f70e6db0ec548b66e9c.tar.gz
Correcting Cert creation for rspec tests
Signed-off-by: John McCrae <john.mccrae@progress.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/integration/client/client_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb
index d2b79edf05..a56c640188 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 {