Skip to content

Commit

Permalink
Merge pull request voxpupuli#885 from voxpupuli/configure_docker_on_t…
Browse files Browse the repository at this point in the history
…ravis

Configure acceptance tests on docker on travis
  • Loading branch information
petems authored Sep 29, 2016
2 parents 21015e3 + ce51574 commit 022278c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
.travis.yml:
secure: "SDpX6jzritODonEQBqy9g0NbOmk2a9dBfAtZLrvHwM8BTpM2W0Y1daqzIbpzxFiqlNX+6r2GSq9SV70N0A9Ko/uPV9aG/XZx7MsBR9DNVjgqjJSl7+aF88VJfRpOv4PAyTM33JMx91nLFxM/ql61YX+2DXGXrhUkBsMZcdBgQnk="
docker_sets:
- set: docker/ubuntu-14.04
- set: docker/centos-7
4 changes: 2 additions & 2 deletions spec/acceptance/nginx_mail_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class { 'nginx':
listen_port => 587,
ssl => true,
ssl_port => 465,
ssl_cert => '/tmp/blah.cert',
ssl_key => '/tmp/blah.key',
ssl_cert => '/etc/pki/tls/certs/blah.cert',
ssl_key => '/etc/pki/tls/private/blah.key',
xclient => 'off',
}
"
Expand Down
4 changes: 2 additions & 2 deletions spec/acceptance/nginx_vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class { 'nginx': }
nginx::resource::vhost { 'www.puppetlabs.com':
ensure => present,
ssl => true,
ssl_cert => '/tmp/blah.cert',
ssl_key => '/tmp/blah.key',
ssl_cert => '/etc/pki/tls/certs/blah.cert',
ssl_key => '/etc/pki/tls/private/blah.key',
www_root => '/var/www/www.puppetlabs.com',
}
host { 'www.puppetlabs.com': ip => '127.0.0.1', }
Expand Down
14 changes: 12 additions & 2 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'beaker-rspec'
require 'pry'
require 'beaker/puppet_install_helper'

install_puppet_on(hosts)
run_puppet_install_helper

RSpec.configure do |c|
# Project root
Expand Down Expand Up @@ -64,6 +64,16 @@
aIZ8kxsBjLvpi9KQTHi7Wl6Sw3ecoYdKy+2P8S5xOIpWjs8XVmOWf7Tq1+9KPv3z
HLw/FDCzntkdq3G4em15CdFlO9BTY4HXiHU=
-----END CERTIFICATE-----" > /tmp/blah.cert'

#--- START SELINUX WORKAROUND ---
if fact('osfamily') == 'Debian'
on host, 'mkdir -p /etc/pki/tls/certs'
on host, 'mkdir -p /etc/pki/tls/private'
end

# put the keys in a directory with the correct SELinux context
on host, 'cp /tmp/blah.cert /etc/pki/tls/certs/blah.cert'
on host, 'cp /tmp/blah.key /etc/pki/tls/private/blah.key'
end
end
end

0 comments on commit 022278c

Please sign in to comment.