File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,13 +33,14 @@ class { '::rabbitmq':
3333 EOS
3434
3535 apply_manifest ( pp , :catch_failures => true )
36+ apply_manifest ( pp , :catch_changes => true )
3637 end
3738
38- describe command ( 'rabbitmqctl list_policies -p myhost' ) do
39- its ( :stdout ) { should match / myhost/ }
40- its ( : stdout) { should match / ha-all/ }
41- its ( :stdout ) { should match /ha-sync-mode/ }
42- its ( :stdout ) { should match / \. \* / }
39+ it 'should have the policy' do
40+ shell ( 'rabbitmqctl list_policies -p myhost' ) do | r |
41+ expect ( r . stdout ) . to match ( /myhost.* ha-all.*ha-sync-mode/ )
42+ expect ( r . exit_code ) . to be_zero
43+ end
4344 end
4445
4546 end
Original file line number Diff line number Diff line change @@ -24,11 +24,14 @@ class { '::rabbitmq':
2424 EOS
2525
2626 apply_manifest ( pp , :catch_failures => true )
27+ apply_manifest ( pp , :catch_changes => true )
2728 end
2829
29- describe command ( 'rabbitmqctl list_users | grep dan' ) do
30- its ( :stdout ) { should match /dan/ }
31- its ( :stdout ) { should match /administrator/ }
30+ it 'should have the user' do
31+ shell ( 'rabbitmqctl list_users' ) do |r |
32+ expect ( r . stdout ) . to match ( /dan.*administrator/ )
33+ expect ( r . exit_code ) . to be_zero
34+ end
3235 end
3336
3437 end
Original file line number Diff line number Diff line change @@ -23,10 +23,14 @@ class { '::rabbitmq':
2323 EOS
2424
2525 apply_manifest ( pp , :catch_failures => true )
26+ apply_manifest ( pp , :catch_changes => true )
2627 end
2728
28- describe command ( 'rabbitmqctl list_vhosts | grep myhost' ) do
29- its ( :stdout ) { should match /myhost/ }
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
3034 end
3135
3236 end
You can’t perform that action at this time.
0 commit comments