Skip to content
Snippets Groups Projects
Unverified Commit edff5690 authored by Romain Tartière's avatar Romain Tartière Committed by GitHub
Browse files

Fix CI (#289)

* Make rubocop happy

* Make puppet-lint happy

* Fix resetting bundler_args

The default value was not cleared, resulting in prerequisites not being
installed before running acceptance tests.
parent c904b9ec
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ matrix:
rvm: 2.5.3
stage: spec
-
bundler_args:
bundler_args: "--with system_tests"
env: ["PUPPET_INSTALL_TYPE=agent", "BEAKER_IS_PE=no", "BEAKER_PUPPET_COLLECTION=puppet5", "BEAKER_debug=true", "BEAKER_setfile=debian8-64{hypervisor=docker}"]
rvm: default
script: bundle exec rspec spec/acceptance/*_spec.rb
......@@ -49,7 +49,7 @@ matrix:
stage: acceptance
sudo: required
-
bundler_args:
bundler_args: "--with system_tests"
env: ["PUPPET_INSTALL_TYPE=agent", "BEAKER_IS_PE=no", "BEAKER_PUPPET_COLLECTION=puppet5", "BEAKER_debug=true", "BEAKER_setfile=debian9-64{hypervisor=docker}"]
rvm: default
script: bundle exec rspec spec/acceptance/*_spec.rb
......@@ -57,7 +57,7 @@ matrix:
stage: acceptance
sudo: required
-
bundler_args:
bundler_args: "--with system_tests"
env: ["PUPPET_INSTALL_TYPE=agent", "BEAKER_IS_PE=no", "BEAKER_PUPPET_COLLECTION=puppet5", "BEAKER_debug=true", "BEAKER_setfile=ubuntu1404-64{hypervisor=docker}"]
rvm: default
script: bundle exec rspec spec/acceptance/*_spec.rb
......@@ -65,7 +65,7 @@ matrix:
stage: acceptance
sudo: required
-
bundler_args:
bundler_args: "--with system_tests"
env: ["PUPPET_INSTALL_TYPE=agent", "BEAKER_IS_PE=no", "BEAKER_PUPPET_COLLECTION=puppet5", "BEAKER_debug=true", "BEAKER_setfile=ubuntu1604-64{hypervisor=docker}"]
rvm: default
script: bundle exec rspec spec/acceptance/*_spec.rb
......@@ -73,14 +73,14 @@ matrix:
stage: acceptance
sudo: required
-
bundler_args:
bundler_args: "--with system_tests"
env: ["PUPPET_INSTALL_TYPE=agent", "BEAKER_IS_PE=no", "BEAKER_PUPPET_COLLECTION=puppet5", "BEAKER_debug=true", "BEAKER_setfile=ubuntu1804-64{hypervisor=docker}"]
rvm: default
script: bundle exec rspec spec/acceptance/*_spec.rb
services: docker
sudo: required
-
bundler_args:
bundler_args: "--with system_tests"
env: ["PUPPET_INSTALL_TYPE=agent", "BEAKER_IS_PE=no", "BEAKER_PUPPET_COLLECTION=puppet5", "BEAKER_debug=true", "BEAKER_setfile=centos6-64{hypervisor=docker}"]
rvm: default
script: bundle exec rspec spec/acceptance/*_spec.rb
......@@ -88,7 +88,7 @@ matrix:
stage: acceptance
sudo: required
-
bundler_args:
bundler_args: "--with system_tests"
env: ["PUPPET_INSTALL_TYPE=agent", "BEAKER_IS_PE=no", "BEAKER_PUPPET_COLLECTION=puppet5", "BEAKER_debug=true", "BEAKER_setfile=centos7-64{hypervisor=docker}"]
rvm: default
script: bundle exec rspec spec/acceptance/*_spec.rb
......
......@@ -49,7 +49,7 @@ define postfix::transport (
) {
include ::postfix::augeas
$smtp_nexthop = ("${nexthop}" =~ /\[.*\]/)
$smtp_nexthop = (String($nexthop) =~ /\[.*\]/)
case $ensure {
'present': {
......
......@@ -222,56 +222,74 @@ describe 'postfix' do
end
end
context 'when specifying a custom mastercf_content' do
let (:params) { {
:mastercf_content => 'testy'
} }
it 'should do stuff' do
let(:params) do
{
mastercf_content: 'testy',
}
end
it 'does stuff' do
skip 'need to write this still'
end
end
context 'when specifying a custom mastercf_template' do
let (:params) { {
:mastercf_template => 'testy'
} }
it 'should do stuff' do
let(:params) do
{
mastercf_template: 'testy',
}
end
it 'does stuff' do
skip 'need to write this still'
end
end
context 'when specifying a custom mastercf_source and mastercf_content' do
let (:params) { {
:mastercf_source => 'testy_1' ,
:mastercf_content => 'testy_2'
} }
it 'should fail' do
expect { should compile }.to raise_error(/mutually exclusive/)
let(:params) do
{
mastercf_source: 'testy_1',
mastercf_content: 'testy_2',
}
end
it 'fails' do
expect { is_expected.to compile }.to raise_error(%r{mutually exclusive})
end
end
context 'when specifying a custom mastercf_source and mastercf_template' do
let (:params) { {
:mastercf_source => 'testy_1' ,
:mastercf_template => 'testy_2'
} }
it 'should fail' do
expect { should compile }.to raise_error(/mutually exclusive/)
let(:params) do
{
mastercf_source: 'testy_1',
mastercf_template: 'testy_2',
}
end
it 'fails' do
expect { is_expected.to compile }.to raise_error(%r{mutually exclusive})
end
end
context 'when specifying a custom mastercf_content and mastercf_template' do
let (:params) { {
:mastercf_content => 'testy_1' ,
:mastercf_template => 'testy_2'
} }
it 'should fail' do
expect { should compile }.to raise_error(/mutually exclusive/)
let(:params) do
{
mastercf_content: 'testy_1',
mastercf_template: 'testy_2',
}
end
it 'fails' do
expect { is_expected.to compile }.to raise_error(%r{mutually exclusive})
end
end
context 'when specifying a mastercf_source and custom mastercf_content and mastercf_template' do
let (:params) { {
:mastercf_source => 'testy_1' ,
:mastercf_content => 'testy_2' ,
:mastercf_template => 'testy_3'
} }
it 'should fail' do
expect { should compile }.to raise_error(/mutually exclusive/)
let(:params) do
{
mastercf_source: 'testy_1',
mastercf_content: 'testy_2',
mastercf_template: 'testy_3',
}
end
it 'fails' do
expect { is_expected.to compile }.to raise_error(%r{mutually exclusive})
end
end
context 'when specifying a custom master_smtp' do
......
......@@ -110,7 +110,7 @@ describe 'postfix::map' do
it { is_expected.to contain_file('postfix map foo').with_ensure('absent') }
it { is_expected.to contain_file('postfix map foo').without_notify }
it { is_expected.to contain_file('postfix map foo.db').with_ensure('absent') }
it { is_expected.to contain_exec('generate foo.db').with(:command => 'rm /etc/postfix/foo.db') }
it { is_expected.to contain_exec('generate foo.db').with(command: 'rm /etc/postfix/foo.db') }
end
context 'when using pcre type' do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment