messaging: add cluster_node_type param

Allow the end-user to choose starting RabbitMQ in RAM or on the disk.
Backward compatible since the default value is to 'disk'.

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi
2014-04-09 13:01:15 +02:00
parent b56cd59ff6
commit 6ac991e465
2 changed files with 24 additions and 6 deletions

View File

@@ -24,20 +24,32 @@ describe 'cloud::messaging' do
let :params do
{
:rabbit_names => ['foo','boo','zoo'],
:rabbit_password => 'secrete'
:rabbit_names => ['foo','boo','zoo'],
:rabbit_password => 'secrete',
:cluster_node_type => 'disc'
}
end
it 'configure rabbitmq-server' do
it 'configure rabbitmq-server with default values' do
should contain_class('rabbitmq').with(
:delete_guest_user => true,
:config_cluster => true,
:cluster_nodes => params[:rabbit_names],
:wipe_db_on_cookie_change => true
:wipe_db_on_cookie_change => true,
:cluster_node_type => 'disc'
)
end
context 'with RAM mode' do
before :each do
params.merge!( :cluster_node_type => 'ram')
end
it 'configure rabbitmq-server in RAM mode' do
should contain_class('rabbitmq').with( :cluster_node_type => 'ram' )
end
end
end
context 'on Debian platforms' do