Skip to content

Commit 99dbf69

Browse files
author
Christopher Thorn
committed
(maint) Update spec helper for solaris fix
1 parent 256435c commit 99dbf69

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

spec/spec_helper_acceptance.rb

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
require 'beaker-rspec'
2-
require 'beaker-puppet'
32
require 'beaker/module_install_helper'
43
require 'beaker/puppet_install_helper'
54

65
RSpec.configure do |c|
76
c.before :suite do
87
unless ENV['BEAKER_provision'] == 'no'
98
# Until solaris gets new image we need to add to the cert chain on solaris, call a beaker-puppet setup script to handle this
10-
bp_path, _status = Open3.capture2('bundler info beaker-puppet --path')
11-
bp_path.strip!
12-
solaris_patch_path = bp_path + '/setup/common/003_solaris_cert_fix.rb'
13-
require solaris_patch_path
9+
hosts.each do |host|
10+
if host.platform=~ /solaris-11(\.2)?-(i386|sparc)/
11+
create_remote_file(host, "DigiCertTrustedRootG4.crt.pem", DigiCert)
12+
on(host, 'chmod a+r /root/DigiCertTrustedRootG4.crt.pem')
13+
on(host, 'cp -p /root/DigiCertTrustedRootG4.crt.pem /etc/certs/CA/')
14+
on(host, 'rm /root/DigiCertTrustedRootG4.crt.pem')
15+
on(host, '/usr/sbin/svcadm restart /system/ca-certificates')
16+
timeout = 60
17+
counter = 0
18+
while on(host, 'svcs -x ca-certificates').output !~ /State: online/ do
19+
raise 'ca-certificates services failed start up' if counter > timeout
20+
sleep 5
21+
counter = counter + 5
22+
end
23+
end
24+
end
1425
run_puppet_install_helper
1526
install_module_on(hosts)
1627
install_module_dependencies_on(hosts)

0 commit comments

Comments
 (0)