Files
puppet-openstacklib/spec/acceptance/rabbitmq_spec.rb
Emilien Macchi 50f1667f31 acceptance: do not enable EPEL
EPEL is causing CI failures randomly, because Fedora servers are quite
often down and do not offer EPEL repos in a stable way.

This patch just disables the usage of EPEL which is not needed to
download RabbitMQ.

Change-Id: Ifc04092b924b867063fc5c50960b1600b3fe379d
2016-03-26 15:01:28 -04:00

58 lines
1.4 KiB
Ruby

require 'spec_helper_acceptance'
describe 'openstacklib class' do
context 'default parameters' do
it 'should work with no errors' do
pp= <<-EOS
Exec { logoutput => 'on_failure' }
if $::osfamily == 'RedHat' {
class { '::openstack_extras::repo::redhat::redhat':
release => 'kilo',
manage_epel => false,
}
$package_provider = 'yum'
} else {
include ::apt
$package_provider = 'apt'
}
class { '::rabbitmq':
delete_guest_user => true,
package_provider => $package_provider
}
# openstacklib resources
include ::openstacklib::openstackclient
::openstacklib::messaging::rabbitmq { 'beaker':
userid => 'beaker',
is_admin => true,
}
EOS
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
end
describe 'test rabbitmq resources' do
it 'should list rabbitmq beaker resources' do
shell('rabbitmqctl list_users') do |r|
expect(r.stdout).to match(/^beaker/)
expect(r.stdout).not_to match(/^guest/)
expect(r.exit_code).to eq(0)
end
shell('rabbitmqctl list_permissions') do |r|
expect(r.stdout).to match(/^beaker\t\.\*\t\.\*\t\.\*$/)
expect(r.exit_code).to eq(0)
end
end
end
end
end