
This commit[1] in puppet-stdlib adds the package_provider. Since
puppetlabs-stdlib 4.11 in pulled out of the repo[2], it has this patch.
The declaration of the $package_provider variable is no longer possible.
This patch removes it and uses the fact.
Closes-Bug: 1568983
[1] e1a9bf5063
[2] http://logs.openstack.org/90/304190/1/check/gate-puppet-openstacklib-puppet-beaker-rspec-centos-7/9a2160a/console.html#_2016-04-11_15_55_23_678
Change-Id: I61edd49393694f2627cbe07064013dd75eef11a9
56 lines
1.4 KiB
Ruby
56 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,
|
|
}
|
|
} else {
|
|
include ::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
|