Commit 4809d809 authored by Raphaël Pinson's avatar Raphaël Pinson Committed by GitHub

Fix acceptance tests (#144)

* Ensure exim4 is stopped on Debian before testing
* Ensure sendmail ist stopped on RedHat systems before testing
* Support Ubuntu 16.04 instead of 12.04
parent 87b97db1
......@@ -46,14 +46,14 @@ matrix:
sudo: required
dist: trusty
services: docker
env: BEAKER_set="ubuntu-12.04"
env: BEAKER_set="ubuntu-14.04"
bundler_args:
script: sudo service docker restart ; sleep 10 && bundle exec rspec spec/acceptance/*_spec.rb
- rvm: default
sudo: required
dist: trusty
services: docker
env: BEAKER_set="ubuntu-14.04"
env: BEAKER_set="ubuntu-16.04"
bundler_args:
script: sudo service docker restart ; sleep 10 && bundle exec rspec spec/acceptance/*_spec.rb
- rvm: default
......
......@@ -30,8 +30,8 @@
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"12.04",
"14.04"
"14.04",
"16.04"
]
},
{
......
......@@ -5,6 +5,22 @@ describe 'postfix class' do
context 'default parameters' do
it 'should work idempotently with no errors' do
pp = <<-EOS
# Make sure the default mailer is stopped in docker containers
if $::operatingsystem == 'Debian' {
service { 'exim4':
ensure => stopped,
hasstatus => false,
before => Class['postfix'],
}
}
if $::osfamily == 'RedHat' {
service { 'sendmail':
ensure => stopped,
hasstatus => false,
before => Class['postfix'],
}
}
class { 'postfix': }
EOS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment