Commit b3e158ef authored by Mickaël Canévet's avatar Mickaël Canévet
Browse files

Fix unit tests

parent 4488f67e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ describe 'postfix::satellite' do
    :osfamily                        => 'Debian',
    :needs_postfix_class_with_params => true,
  } }
  it { should include_class('postfix::mta') }
  it { should contain_class('postfix::mta') }
  it { should contain_postfix__virtual('@foo.example.com').with(
    :ensure      => 'present',
    :destination => 'root'
+8 −8
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ describe 'postfix' do
      end
      context 'when enabling ldap' do
        it 'should do stuff' do
          pending 'need to write this still'
          skip 'need to write this still'
        end
      end
      context 'when a custom mail_user is specified' do
@@ -169,7 +169,7 @@ describe 'postfix' do
          :mailman => true
        } }
        it 'should do stuff' do
          pending 'need to write this still'
          skip 'need to write this still'
        end
      end
      context 'when specifying a custom mastercf_source' do
@@ -177,7 +177,7 @@ describe 'postfix' do
          :mastercf_source => 'testy'
        } }
        it 'should do stuff' do
          pending 'need to write this still'
          skip 'need to write this still'
        end
      end
      context 'when specifying a custom master_smtp' do
@@ -209,7 +209,7 @@ describe 'postfix' do
          should contain_postfix__config('virtual_alias_maps').with_value('hash:/etc/postfix/virtual')
          should contain_postfix__config('transport_maps').with_value('hash:/etc/postfix/transport')
        end
        it { should include_class('postfix::mta') }
        it { should contain_class('postfix::mta') }
        context 'and satellite is also enabled' do
          let (:params) { { :mta => true, :satellite => true, :mydestination => '1.2.3.4', :relayhost => '2.3.4.5' } }
          it 'should fail' do
@@ -219,12 +219,12 @@ describe 'postfix' do
      end
      context 'when specifying mydesitination' do
        it 'should do stuff' do
          pending 'need to write this still'
          skip 'need to write this still'
        end
      end
      context 'when specifying mynetworks' do
        it 'should do stuff' do
          pending 'need to write this still'
          skip 'need to write this still'
        end
      end
      context 'when specifying myorigin' do
@@ -235,7 +235,7 @@ describe 'postfix' do
      end
      context 'when specifying relayhost' do
        it 'should do stuff' do
          pending 'need to write this still'
          skip 'need to write this still'
        end
      end
      context 'when specifying a root_mail_recipient' do
@@ -263,7 +263,7 @@ describe 'postfix' do
      context 'when specifying smtp_listen' do
        let (:params) { { :smtp_listen => 'all' } }
        it 'should do stuff' do
          pending 'need to write this still'
          skip 'need to write this still'
        end
      end
      context 'when use_amavisd is true' do
+3 −3
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ describe 'postfix::transport' do
  end

  context 'when using default values' do
    it { should include_class('postfix::augeas') }
    it { should contain_class('postfix::augeas') }
    it { should contain_augeas('Postfix transport - foo').with(
      :incl    => '/etc/postfix/transport',
      :lens    => 'Postfix_Transport.lns',
@@ -104,7 +104,7 @@ describe 'postfix::transport' do
      :ensure      => 'present',
    } }

    it { should include_class('postfix::augeas') }
    it { should contain_class('postfix::augeas') }
    it { should contain_augeas('Postfix transport - foo').with(
      :incl    => '/tmp/transport',
      :lens    => 'Postfix_Transport.lns',
@@ -122,7 +122,7 @@ describe 'postfix::transport' do
      :ensure      => 'absent',
    } }

    it { should include_class('postfix::augeas') }
    it { should contain_class('postfix::augeas') }
    it { should contain_augeas('Postfix transport - foo').with(
      :incl    => '/etc/postfix/transport',
      :lens    => 'Postfix_Transport.lns',
+3 −3
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ describe 'postfix::virtual' do
      :destination => 'bar',
    } }

    it { should include_class('postfix::augeas') }
    it { should contain_class('postfix::augeas') }
    it { should contain_augeas('Postfix virtual - foo').with(
      :incl    => '/etc/postfix/virtual',
      :lens    => 'Postfix_Virtual.lns',
@@ -101,7 +101,7 @@ describe 'postfix::virtual' do
      :ensure      => 'present',
    } }

    it { should include_class('postfix::augeas') }
    it { should contain_class('postfix::augeas') }
    it { should contain_augeas('Postfix virtual - foo').with(
      :incl    => '/tmp/virtual',
      :lens    => 'Postfix_Virtual.lns',
@@ -118,7 +118,7 @@ describe 'postfix::virtual' do
      :ensure      => 'absent',
    } }

    it { should include_class('postfix::augeas') }
    it { should contain_class('postfix::augeas') }
    it { should contain_augeas('Postfix virtual - foo').with(
      :incl    => '/etc/postfix/virtual',
      :lens    => 'Postfix_Virtual.lns',