1 require 'spec_helper_acceptance'
3 describe 'rabbitmq policy on a vhost:' do
6 context "create policy resource" do
7 it 'should run successfully' do
9 if $::osfamily == 'RedHat' {
10 class { 'erlang': epel_enable => true }
11 Class['erlang'] -> Class['::rabbitmq']
14 service_manage => true,
16 delete_guest_user => true,
20 rabbitmq_vhost { 'myhost':
24 rabbitmq_policy { 'ha-all@myhost':
30 'ha-sync-mode' => 'automatic',
35 apply_manifest(pp, :catch_failures => true)
36 apply_manifest(pp, :catch_changes => true)
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