Skip to content
Snippets Groups Projects
Commit b3e158ef authored by Mickaël Canévet's avatar Mickaël Canévet
Browse files

Fix unit tests

parent 4488f67e
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ describe 'postfix::satellite' do ...@@ -6,7 +6,7 @@ describe 'postfix::satellite' do
:osfamily => 'Debian', :osfamily => 'Debian',
:needs_postfix_class_with_params => true, :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( it { should contain_postfix__virtual('@foo.example.com').with(
:ensure => 'present', :ensure => 'present',
:destination => 'root' :destination => 'root'
......
...@@ -153,7 +153,7 @@ describe 'postfix' do ...@@ -153,7 +153,7 @@ describe 'postfix' do
end end
context 'when enabling ldap' do context 'when enabling ldap' do
it 'should do stuff' do it 'should do stuff' do
pending 'need to write this still' skip 'need to write this still'
end end
end end
context 'when a custom mail_user is specified' do context 'when a custom mail_user is specified' do
...@@ -169,7 +169,7 @@ describe 'postfix' do ...@@ -169,7 +169,7 @@ describe 'postfix' do
:mailman => true :mailman => true
} } } }
it 'should do stuff' do it 'should do stuff' do
pending 'need to write this still' skip 'need to write this still'
end end
end end
context 'when specifying a custom mastercf_source' do context 'when specifying a custom mastercf_source' do
...@@ -177,7 +177,7 @@ describe 'postfix' do ...@@ -177,7 +177,7 @@ describe 'postfix' do
:mastercf_source => 'testy' :mastercf_source => 'testy'
} } } }
it 'should do stuff' do it 'should do stuff' do
pending 'need to write this still' skip 'need to write this still'
end end
end end
context 'when specifying a custom master_smtp' do context 'when specifying a custom master_smtp' do
...@@ -209,7 +209,7 @@ describe 'postfix' 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('virtual_alias_maps').with_value('hash:/etc/postfix/virtual')
should contain_postfix__config('transport_maps').with_value('hash:/etc/postfix/transport') should contain_postfix__config('transport_maps').with_value('hash:/etc/postfix/transport')
end end
it { should include_class('postfix::mta') } it { should contain_class('postfix::mta') }
context 'and satellite is also enabled' do context 'and satellite is also enabled' do
let (:params) { { :mta => true, :satellite => true, :mydestination => '1.2.3.4', :relayhost => '2.3.4.5' } } let (:params) { { :mta => true, :satellite => true, :mydestination => '1.2.3.4', :relayhost => '2.3.4.5' } }
it 'should fail' do it 'should fail' do
...@@ -219,12 +219,12 @@ describe 'postfix' do ...@@ -219,12 +219,12 @@ describe 'postfix' do
end end
context 'when specifying mydesitination' do context 'when specifying mydesitination' do
it 'should do stuff' do it 'should do stuff' do
pending 'need to write this still' skip 'need to write this still'
end end
end end
context 'when specifying mynetworks' do context 'when specifying mynetworks' do
it 'should do stuff' do it 'should do stuff' do
pending 'need to write this still' skip 'need to write this still'
end end
end end
context 'when specifying myorigin' do context 'when specifying myorigin' do
...@@ -235,7 +235,7 @@ describe 'postfix' do ...@@ -235,7 +235,7 @@ describe 'postfix' do
end end
context 'when specifying relayhost' do context 'when specifying relayhost' do
it 'should do stuff' do it 'should do stuff' do
pending 'need to write this still' skip 'need to write this still'
end end
end end
context 'when specifying a root_mail_recipient' do context 'when specifying a root_mail_recipient' do
...@@ -263,7 +263,7 @@ describe 'postfix' do ...@@ -263,7 +263,7 @@ describe 'postfix' do
context 'when specifying smtp_listen' do context 'when specifying smtp_listen' do
let (:params) { { :smtp_listen => 'all' } } let (:params) { { :smtp_listen => 'all' } }
it 'should do stuff' do it 'should do stuff' do
pending 'need to write this still' skip 'need to write this still'
end end
end end
context 'when use_amavisd is true' do context 'when use_amavisd is true' do
......
...@@ -84,7 +84,7 @@ describe 'postfix::transport' do ...@@ -84,7 +84,7 @@ describe 'postfix::transport' do
end end
context 'when using default values' do 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( it { should contain_augeas('Postfix transport - foo').with(
:incl => '/etc/postfix/transport', :incl => '/etc/postfix/transport',
:lens => 'Postfix_Transport.lns', :lens => 'Postfix_Transport.lns',
...@@ -104,7 +104,7 @@ describe 'postfix::transport' do ...@@ -104,7 +104,7 @@ describe 'postfix::transport' do
:ensure => 'present', :ensure => 'present',
} } } }
it { should include_class('postfix::augeas') } it { should contain_class('postfix::augeas') }
it { should contain_augeas('Postfix transport - foo').with( it { should contain_augeas('Postfix transport - foo').with(
:incl => '/tmp/transport', :incl => '/tmp/transport',
:lens => 'Postfix_Transport.lns', :lens => 'Postfix_Transport.lns',
...@@ -122,7 +122,7 @@ describe 'postfix::transport' do ...@@ -122,7 +122,7 @@ describe 'postfix::transport' do
:ensure => 'absent', :ensure => 'absent',
} } } }
it { should include_class('postfix::augeas') } it { should contain_class('postfix::augeas') }
it { should contain_augeas('Postfix transport - foo').with( it { should contain_augeas('Postfix transport - foo').with(
:incl => '/etc/postfix/transport', :incl => '/etc/postfix/transport',
:lens => 'Postfix_Transport.lns', :lens => 'Postfix_Transport.lns',
......
...@@ -83,7 +83,7 @@ describe 'postfix::virtual' do ...@@ -83,7 +83,7 @@ describe 'postfix::virtual' do
:destination => 'bar', :destination => 'bar',
} } } }
it { should include_class('postfix::augeas') } it { should contain_class('postfix::augeas') }
it { should contain_augeas('Postfix virtual - foo').with( it { should contain_augeas('Postfix virtual - foo').with(
:incl => '/etc/postfix/virtual', :incl => '/etc/postfix/virtual',
:lens => 'Postfix_Virtual.lns', :lens => 'Postfix_Virtual.lns',
...@@ -101,7 +101,7 @@ describe 'postfix::virtual' do ...@@ -101,7 +101,7 @@ describe 'postfix::virtual' do
:ensure => 'present', :ensure => 'present',
} } } }
it { should include_class('postfix::augeas') } it { should contain_class('postfix::augeas') }
it { should contain_augeas('Postfix virtual - foo').with( it { should contain_augeas('Postfix virtual - foo').with(
:incl => '/tmp/virtual', :incl => '/tmp/virtual',
:lens => 'Postfix_Virtual.lns', :lens => 'Postfix_Virtual.lns',
...@@ -118,7 +118,7 @@ describe 'postfix::virtual' do ...@@ -118,7 +118,7 @@ describe 'postfix::virtual' do
:ensure => 'absent', :ensure => 'absent',
} } } }
it { should include_class('postfix::augeas') } it { should contain_class('postfix::augeas') }
it { should contain_augeas('Postfix virtual - foo').with( it { should contain_augeas('Postfix virtual - foo').with(
:incl => '/etc/postfix/virtual', :incl => '/etc/postfix/virtual',
:lens => 'Postfix_Virtual.lns', :lens => 'Postfix_Virtual.lns',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment