From 835fc66d7a17ba13cc2dda4fc099a6a2569b847e Mon Sep 17 00:00:00 2001 From: Michael Hamrah Date: Tue, 21 Oct 2014 16:35:27 -0400 Subject: [PATCH 1/2] use rpm for RedHat family --- manifests/params.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index abe7c52b7..c805c1968 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -26,7 +26,7 @@ $package_ensure = 'installed' $package_name = 'rabbitmq-server' $service_name = 'rabbitmq-server' - $package_provider = 'yum' + $package_provider = 'rpm' $version = '3.1.5-1' $base_version = regsubst($version,'^(.*)-\d$','\1') # This must remain at the end as we need $base_version and $version defined first. From a6b2f8084273a424f64ab8c173cb70c3feef7f43 Mon Sep 17 00:00:00 2001 From: Michael Hamrah Date: Wed, 22 Oct 2014 09:45:29 -0400 Subject: [PATCH 2/2] passing tests --- README.md | 2 +- spec/classes/rabbitmq_spec.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 228340f4a..185fe7fc0 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ class { 'rabbitmq': * rabbitmq::params: Different configuration data for different systems. * rabbitmq::service: Handles the rabbitmq service. * rabbitmq::repo::apt: Handles apt repo for Debian systems. -* rabbitmq::repo::rhel: Handles yum repo for Redhat systems. +* rabbitmq::repo::rhel: Handles rpm repo for Redhat systems. ###Parameters diff --git a/spec/classes/rabbitmq_spec.rb b/spec/classes/rabbitmq_spec.rb index e82a64e6b..2309ec667 100644 --- a/spec/classes/rabbitmq_spec.rb +++ b/spec/classes/rabbitmq_spec.rb @@ -277,7 +277,7 @@ it { should contain_rabbitmq_plugin('rabbitmq_auth_backend_ldap') } it 'should contain ldap parameters' do - verify_contents(subject, 'rabbitmq.config', + verify_contents(subject, 'rabbitmq.config', ['[', ' {rabbit, [', ' {auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},', ' ]}', ' {rabbitmq_auth_backend_ldap, [', ' {other_bind, anon},', ' {servers, ["ldap.example.com"]},', @@ -301,7 +301,7 @@ it { should contain_rabbitmq_plugin('rabbitmq_auth_backend_ldap') } it 'should contain ldap parameters' do - verify_contents(subject, 'rabbitmq.config', + verify_contents(subject, 'rabbitmq.config', ['[', ' {rabbit, [', ' {auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},', ' ]}', ' {rabbitmq_auth_backend_ldap, [', ' {other_bind, anon},', ' {servers, ["ldap.example.com"]},', @@ -460,7 +460,7 @@ it 'should set config variables' do should contain_file('rabbitmq.config') \ .with_content(/\{inet_dist_listen_min, 9100\}/) \ - .with_content(/\{inet_dist_listen_max, 9105\}/) + .with_content(/\{inet_dist_listen_max, 9105\}/) end end @@ -564,7 +564,7 @@ should contain_package('rabbitmq-server').with( 'ensure' => 'installed', 'name' => 'rabbitmq-server', - 'provider' => 'yum', + 'provider' => 'rpm', 'source' => 'http://www.rabbitmq.com/releases/rabbitmq-server/v3.2.3/rabbitmq-server-3.2.3-1.noarch.rpm' ) end