2015-04-06 04:53:52 +02:00
|
|
|
require 'beaker-rspec'
|
|
|
|
|
|
|
|
hosts.each do |host|
|
|
|
|
# Install Puppet
|
|
|
|
on host, install_puppet
|
|
|
|
end
|
2013-09-04 21:11:36 +02:00
|
|
|
|
|
|
|
RSpec.configure do |c|
|
|
|
|
# Project root
|
|
|
|
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
|
|
|
|
2015-04-06 04:53:52 +02:00
|
|
|
c.formatter = :documentation
|
2013-09-04 21:11:36 +02:00
|
|
|
|
|
|
|
# This is where we 'setup' the nodes before running our tests
|
|
|
|
c.before :suite do
|
2015-04-06 04:53:52 +02:00
|
|
|
hosts.each do |host|
|
|
|
|
# Install module
|
|
|
|
copy_module_to(host, :source => proj_root, :module_name => 'nginx')
|
|
|
|
if fact('osfamily') == 'Debian'
|
|
|
|
on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] }
|
|
|
|
end
|
|
|
|
on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
|
|
|
|
on host, puppet('module','install','puppetlabs-concat'), { :acceptable_exit_codes => [0,1] }
|
2013-12-01 00:52:55 +01:00
|
|
|
|
2015-04-06 04:53:52 +02:00
|
|
|
# Fake keys.
|
|
|
|
# Valid self-signed SSL key with 10 year expiry.
|
|
|
|
# Required for nginx to start when SSL enabled
|
|
|
|
on host, shell('echo "-----BEGIN PRIVATE KEY-----
|
2013-12-01 00:52:55 +01:00
|
|
|
MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAOPchwRZRF4KmU6E
|
|
|
|
g7C6Pq9zhdLiQt9owdcLZNiZS+UVRQjeDHSy3titzh5YwSoQonlnSqd0g/PJ6kNA
|
|
|
|
O3CNOMVuzAddnAaHzW1J4Rt6sZwOuidtJC4t/hFCgz5NqOMgYOOfratQx00A7ZXK
|
|
|
|
TXMgNG79lDP5L/N06Ox53sOxhy4hAgMBAAECgYEAlfktCKi0fe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