1 require 'spec_helper_acceptance'
3 describe 'openstacklib class' do
5 context 'default parameters' do
7 it 'should work with no errors' do
9 Exec { logoutput => 'on_failure' }
11 if $::osfamily == 'RedHat' {
12 # RabbitMQ is not available in default repo
13 class { '::openstack_extras::repo::redhat::redhat':
14 # Kilo is not GA yet, so let's use the testing repo
17 'rdo-kilo-testing' => {
18 'baseurl' => 'https://repos.fedorapeople.org/repos/openstack/openstack-kilo/testing/el7/',
19 # packages are not GA so not signed
25 $package_provider = 'yum'
27 $package_provider = 'apt'
31 delete_guest_user => true,
32 package_provider => $package_provider
35 # openstacklib resources
36 include ::openstacklib::openstackclient
38 ::openstacklib::messaging::rabbitmq { 'beaker':
44 # Run it twice and test for idempotency
45 apply_manifest(pp, :catch_failures => true)
46 apply_manifest(pp, :catch_changes => true)
49 describe 'test rabbitmq resources' do
50 it 'should list rabbitmq beaker resources' do
51 shell('rabbitmqctl list_users') do |r|
52 expect(r.stdout).to match(/^beaker/)
53 expect(r.stdout).not_to match(/^guest/)
54 expect(r.exit_code).to eq(0)
57 shell('rabbitmqctl list_permissions') do |r|
58 expect(r.stdout).to match(/^beaker\t\.\*\t\.\*\t\.\*$/)
59 expect(r.exit_code).to eq(0)