Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test cases for #623 (manage_python) #626

Merged
merged 1 commit into from
Sep 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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