X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Frabbitmq%2Fspec%2Facceptance%2Fclustering_spec.rb;fp=3rdparty%2Fmodules%2Frabbitmq%2Fspec%2Facceptance%2Fclustering_spec.rb;h=438c65ba1a1a67979457a07b5b3b4745b899e6dc;hb=24caa46729f80fbba4be8b9b26ebcb3acc4cb0fb;hp=204eef0524758aa252acad51fba0d1299ee04ea3;hpb=c7e7bcc28cc5dc48a7e284a3c82f33df27d1f57d;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/rabbitmq/spec/acceptance/clustering_spec.rb b/3rdparty/modules/rabbitmq/spec/acceptance/clustering_spec.rb index 204eef052..438c65ba1 100644 --- a/3rdparty/modules/rabbitmq/spec/acceptance/clustering_spec.rb +++ b/3rdparty/modules/rabbitmq/spec/acceptance/clustering_spec.rb @@ -2,58 +2,59 @@ require 'spec_helper_acceptance' describe 'rabbitmq clustering' do context 'rabbitmq::wipe_db_on_cookie_change => false' do - it 'runs successfully' do + it 'should run successfully' do pp = <<-EOS - class { 'rabbitmq': + class { 'rabbitmq': config_cluster => true, cluster_nodes => ['rabbit1', 'rabbit2'], cluster_node_type => 'ram', erlang_cookie => 'TESTCOOKIE', wipe_db_on_cookie_change => false, } - if $facts['os']['family'] == 'RedHat' { + if $::osfamily == 'RedHat' { class { 'erlang': epel_enable => true} Class['erlang'] -> Class['rabbitmq'] } EOS - apply_manifest(pp, expect_failures: true) + apply_manifest(pp, :expect_failures => true) end describe file('/var/lib/rabbitmq/.erlang.cookie') do - it { is_expected.not_to contain 'TESTCOOKIE' } + it { should_not contain 'TESTCOOKIE' } end + end context 'rabbitmq::wipe_db_on_cookie_change => true' do - it 'runs successfully' do + it 'should run successfully' do pp = <<-EOS - class { 'rabbitmq': + class { 'rabbitmq': config_cluster => true, cluster_nodes => ['rabbit1', 'rabbit2'], cluster_node_type => 'ram', erlang_cookie => 'TESTCOOKIE', wipe_db_on_cookie_change => true, } - if $facts['os']['family'] == 'RedHat' { + if $::osfamily == 'RedHat' { class { 'erlang': epel_enable => true} Class['erlang'] -> Class['rabbitmq'] } EOS - apply_manifest(pp, catch_failures: true) + apply_manifest(pp, :catch_failures => true) end describe file('/etc/rabbitmq/rabbitmq.config') do - it { is_expected.to be_file } - it { is_expected.to contain 'cluster_nodes' } - it { is_expected.to contain 'rabbit@rabbit1' } - it { is_expected.to contain 'rabbit@rabbit2' } - it { is_expected.to contain 'ram' } + it { should be_file } + it { should contain 'cluster_nodes' } + it { should contain 'rabbit@rabbit1' } + it { should contain 'rabbit@rabbit2' } + it { should contain 'ram' } end describe file('/var/lib/rabbitmq/.erlang.cookie') do - it { is_expected.to be_file } - it { is_expected.to contain 'TESTCOOKIE' } + it { should be_file } + it { should contain 'TESTCOOKIE' } end end end