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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@
    {
      "operatingsystem": "Ubuntu",
      "operatingsystemrelease": [
        "12.04",
        "14.04"
        "14.04",
        "16.04"
      ]
    },
    {
+16 −0
Original line number Diff line number Diff line
@@ -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