]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/rabbitmq/spec/acceptance/vhost_spec.rb
move to puppetlabs rabbitmq module
[dsa-puppet.git] / 3rdparty / modules / rabbitmq / spec / acceptance / vhost_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'rabbitmq vhost:' do
4
5
6   context "create vhost resource" do
7     it 'should run successfully' do
8       pp = <<-EOS
9       if $::osfamily == 'RedHat' {
10         class { 'erlang': epel_enable => true }
11         Class['erlang'] -> Class['::rabbitmq']
12       }
13       class { '::rabbitmq':
14         service_manage    => true,
15         port              => '5672',
16         delete_guest_user => true,
17         admin_enable      => true,
18       } ->
19
20       rabbitmq_vhost { 'myhost':
21         ensure => present,
22       }
23       EOS
24
25       apply_manifest(pp, :catch_failures => true)
26       apply_manifest(pp, :catch_changes => true)
27     end
28
29     it 'should have the vhost' do
30       shell('rabbitmqctl list_vhosts') do |r|
31         expect(r.stdout).to match(/myhost/)
32         expect(r.exit_code).to be_zero
33       end
34     end
35
36   end
37 end