Skip to content

Commit

Permalink
Merge pull request #68 from gerhardsam/cirunner/fix_supported_os
Browse files Browse the repository at this point in the history
Fix cirunner failure-message for unsupported OS families
  • Loading branch information
tobru committed Mar 23, 2016
2 parents 9850c49 + cd03a4d commit f15d398
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/cirunner.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
validate_bool($manage_repo)

unless ($::osfamily == 'Debian' or $::osfamily == 'RedHat') {
fail ("OS family ${::osfamily} is not supported. Only Debian is suppported.")
fail ("OS family ${::osfamily} is not supported. Only Debian and Redhat is suppported.")
}

if $manage_docker {
Expand Down
13 changes: 13 additions & 0 deletions spec/classes/cirunner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,18 @@

end
end
context 'unsupported operating systems' do
describe "gitlab::cirunner class without any parameters on unsupported OS" do
let(:params) {{ }}
let(:facts) {{
:osfamily => 'unsupported_os_family',
}}
it "should fail" do
expect do
catalogue
end.to raise_error(Puppet::Error, /OS family unsupported_os_family is not supported. Only Debian and Redhat is suppported./)
end
end
end

end

0 comments on commit f15d398

Please sign in to comment.