Fix logger settings for RabbitMQ

Also enables unit tests for mcollective module.

Related-Bug: #1517067

Change-Id: Ic4e9ab4851fe520bccf7428481171a18dcb2cbce
This commit is contained in:
Dmitry Teselkin 2015-11-16 20:03:30 +03:00
parent 05a1faa729
commit 60d5bc4f12
4 changed files with 35 additions and 3 deletions

View File

@ -1,3 +1,10 @@
fixtures:
symlinks:
'nailgun': "#{source_dir}"
"nailgun": "#{source_dir}"
"mcollective": "#{source_dir}/../mcollective"
"rabbitmq": "#{source_dir}/../rabbitmq"
repositories:
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
"apt": "git://github.com/puppetlabs/puppetlabs-apt.git"
"staging": "git://github.com/nanliu/puppet-staging.git"
"erlang": "https://github.com/garethr/garethr-erlang.git"

View File

@ -136,7 +136,7 @@ class nailgun::rabbitmq (
'inet_default_connect_options' => '[{nodelay,true}]',
},
config_variables => {
'log_levels' => '[connection,debug,info,error]',
'log_levels' => '[{connection,debug,info,error}]',
'default_vhost' => '<<"">>',
'default_permissions' => '[<<".*">>, <<".*">>, <<".*">>]',
'tcp_listen_options' => $rabbit_tcp_listen_options,

View File

@ -0,0 +1,26 @@
require 'spec_helper'
describe 'nailgun::rabbitmq', :type => :class do
context 'on supported platform' do
let(:facts) {{
:osfamily => 'Debian',
:lsbdistid => 'Ubuntu',
:operatingsystem => 'Ubuntu',
:operatingsystemrelease => '14.04',
}}
context 'with default parameters' do
describe 'declares rabbitmq class' do
it {
should contain_class('rabbitmq')
}
end
describe 'and sets appropriate log_level configuration for rabbitmq' do
it {
should contain_file('rabbitmq.config').with({
'content' => /{log_levels, \[{connection,debug,info,error}\]},/,
})
}
end
end
end
end

View File

@ -12,7 +12,6 @@ heat
heat_ha
horizon
inifile
mcollective
mellanox_openstack
memcached
mongodb