1 require 'spec_helper_acceptance'
3 describe 'rabbitmq::install::rabbitmqadmin class' do
4 context 'does nothing if service is unmanaged' do
5 it 'should run successfully' do
9 service_manage => false,
11 if $::osfamily == 'RedHat' {
12 class { 'erlang': epel_enable => true}
13 Class['erlang'] -> Class['rabbitmq']
17 shell('rm -f /var/lib/rabbitmq/rabbitmqadmin')
18 apply_manifest(pp, :catch_failures => true)
21 describe file('/var/lib/rabbitmq/rabbitmqadmin') do
22 it { should_not be_file }
26 context 'downloads the cli tools' do
27 it 'should run successfully' do
31 service_manage => true,
33 if $::osfamily == 'RedHat' {
34 class { 'erlang': epel_enable => true}
35 Class['erlang'] -> Class['rabbitmq']
39 apply_manifest(pp, :catch_failures => true)
42 describe file('/var/lib/rabbitmq/rabbitmqadmin') do
47 context 'works with specified default credentials' do
48 it 'should run successfully' do
49 # make sure credential change takes effect before admin_enable
52 service_manage => true,
53 default_user => 'foobar',
54 default_pass => 'bazblam',
56 if $::osfamily == 'RedHat' {
57 class { 'erlang': epel_enable => true}
58 Class['erlang'] -> Class['rabbitmq']
65 service_manage => true,
66 default_user => 'foobar',
67 default_pass => 'bazblam',
69 if $::osfamily == 'RedHat' {
70 class { 'erlang': epel_enable => true}
71 Class['erlang'] -> Class['rabbitmq']
75 shell('rm -f /var/lib/rabbitmq/rabbitmqadmin')
76 apply_manifest(pp_pre, :catch_failures => true)
77 apply_manifest(pp, :catch_failures => true)
80 describe file('/var/lib/rabbitmq/rabbitmqadmin') do