From e96d12ee78387fbb58ac91f1ce8cb75d976cb2d9 Mon Sep 17 00:00:00 2001 From: nosrio Date: Mon, 20 May 2024 12:46:32 -0300 Subject: [PATCH] Add unit test to handle bug solved on PR #993 fix identation --- spec/classes/rabbitmq_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/classes/rabbitmq_spec.rb b/spec/classes/rabbitmq_spec.rb index 5fc0e814b..916c82be1 100644 --- a/spec/classes/rabbitmq_spec.rb +++ b/spec/classes/rabbitmq_spec.rb @@ -411,6 +411,21 @@ is_expected.to contain_file('rabbitmq.config').with('content' => %r{cluster_nodes.*\['rabbit@hare-1', 'rabbit@hare-2'\], ram}) end end + + describe 'without cluster_nodes and sets appropriate configuration' do + let(:params) do + { + config_cluster: true, + cluster_node_type: 'ram', + erlang_cookie: 'ORIGINAL', + wipe_db_on_cookie_change: true + } + end + + it 'for cluster_nodes' do + is_expected.to contain_file('rabbitmq.config').with('content' => %r{cluster_nodes.*\[\], ram}) + end + end end describe 'rabbitmq-env configuration' do