aboutsummaryrefslogtreecommitdiff
path: root/spec/spec_helper_acceptance.rb
blob: 665467527ea969f0125a0405077321d86c945417 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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'
      # 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
      run_puppet_install_helper
      install_module_on(hosts)
      install_module_dependencies_on(hosts)
    end
  end
end