diff options
author | Christopher Thorn <christopher.thorn@puppetlabs.com> | 2022-03-21 11:08:55 -0700 |
---|---|---|
committer | Christopher Thorn <christopher.thorn@puppetlabs.com> | 2022-03-21 12:03:18 -0700 |
commit | 9109bce37ae494a4eb101818ed392c2761592574 (patch) | |
tree | 770c256629b948f75b3f2ec8982acf3b1d64d202 | |
parent | 256435cea5f3213be629158fee1171a88bd56523 (diff) | |
download | puppet-augeas_core-9109bce37ae494a4eb101818ed392c2761592574.tar.gz puppet-augeas_core-9109bce37ae494a4eb101818ed392c2761592574.tar.bz2 |
(maint) Update spec helper for solaris fix
-rw-r--r-- | spec/spec_helper_acceptance.rb | 56 |
1 files changed, 51 insertions, 5 deletions
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 6654675..40a011d 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,16 +1,62 @@ require 'beaker-rspec' -require 'beaker-puppet' require 'beaker/module_install_helper' require 'beaker/puppet_install_helper' RSpec.configure do |c| c.before :suite do unless ENV['BEAKER_provision'] == 'no' + + DIGICERT = <<-EOM.freeze +-----BEGIN CERTIFICATE----- +MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBi +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3Qg +RzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1MTIwMDAwWjBiMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQu +Y29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMG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LkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iahixTXTBmyUEFxPT9N +cCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN5r5N +0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie +4u1Ki7wb/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mI +r/OSmbaz5mEP0oUA51Aa5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1 +/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tKG48BtieVU+i2iW1bvGjUI+iLUaJW+fCm +gKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP82Z+ +-----END CERTIFICATE----- +EOM + # Until solaris gets new image we need to add to the cert chain on solaris, call a beaker-puppet setup script to handle this - bp_path, _status = Open3.capture2('bundler info beaker-puppet --path') - bp_path.strip! - solaris_patch_path = bp_path + '/setup/common/003_solaris_cert_fix.rb' - require solaris_patch_path + hosts.each do |host| + next unless host.platform.match? %r{solaris-11(\.2)?-(i386|sparc)} + create_remote_file(host, 'DigiCertTrustedRootG4.crt.pem', DIGICERT) + on(host, 'chmod a+r /root/DigiCertTrustedRootG4.crt.pem') + on(host, 'cp -p /root/DigiCertTrustedRootG4.crt.pem /etc/certs/CA/') + on(host, 'rm /root/DigiCertTrustedRootG4.crt.pem') + on(host, '/usr/sbin/svcadm restart /system/ca-certificates') + timeout = 60 + counter = 0 + while on(host, 'svcs -x ca-certificates').output !~ %r{State: online} + raise 'ca-certificates services failed start up' if counter > timeout + sleep 5 + counter += 5 + end + end run_puppet_install_helper install_module_on(hosts) install_module_dependencies_on(hosts) |