Skip to content

Commit

Permalink
Merge pull request voxpupuli#626 from wyardley/fix_python_spec
Browse files Browse the repository at this point in the history
Fix test cases for voxpupuli#623 (manage_python)
  • Loading branch information
ekohl committed Sep 11, 2017
2 parents bfa322a + f700188 commit 9ec70aa
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions spec/classes/rabbitmq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,20 @@
)
is_expected.to contain_archive('rabbitmqadmin').with_source('http://1.1.1.1:15672/cli/rabbitmqadmin')
end
if facts[:os]['family'] == 'Debian'
it 'python is in the catalog on Debian / Ubuntu' do
is_expected.to contain_package('python')
end
if %w[RedHat Debian SUSE].include?(facts[:os]['family'])
it { is_expected.to contain_package('python') }
end
if %w[Archlinux FreeBSD OpenBSD].include?(facts[:os]['family'])
it { is_expected.to contain_package('python2') }
end
end
context 'with manage_python false' do
let(:params) { { manage_python: false } }

it do
is_expected.to contain_class('rabbitmq::install::rabbitmqadmin')
is_expected.not_to contain_package('python')
is_expected.not_to contain_package('python2')
end
end
context 'with $management_ip_address undef and service_manage set to true' do
Expand Down

0 comments on commit 9ec70aa

Please sign in to comment.