Skip to content

Commit a97d816

Browse files
committed
fix indentation for cluster_nodes and update tests
- fix indentation of cluster_nodes in template - update tests to ensure proper indentation
1 parent 3bcdcb4 commit a97d816

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spec/classes/rabbitmq_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@
408408
end
409409

410410
it 'for cluster_nodes' do
411-
is_expected.to contain_file('rabbitmq.config').with('content' => %r{cluster_nodes.*\['rabbit@hare-1', 'rabbit@hare-2'\], ram})
411+
is_expected.to contain_file('rabbitmq.config').with('content' => %r{^ {4}\{cluster_nodes, \{\['rabbit@hare-1', 'rabbit@hare-2'\], ram})
412412
end
413413
end
414414

@@ -423,7 +423,7 @@
423423
end
424424

425425
it 'for cluster_nodes' do
426-
is_expected.to contain_file('rabbitmq.config').with('content' => %r{cluster_nodes.*\[\], ram})
426+
is_expected.to contain_file('rabbitmq.config').with('content' => %r{^ {4}\{cluster_nodes, \{\[\], ram})
427427
end
428428
end
429429
end

templates/rabbitmq.config.epp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
{auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},
2020
<% } -%>
2121
<% if $rabbitmq::config::config_cluster {-%>
22-
<% if !$rabbitmq::config::cluster_nodes.empty {-%>
22+
<%- if !$rabbitmq::config::cluster_nodes.empty {-%>
2323
{cluster_nodes, {['rabbit@<%= $rabbitmq::config::cluster_nodes.join("', 'rabbit@") %>'], <%= $rabbitmq::config::cluster_node_type %>}},
24-
<% } else {%>
24+
<%- } else {-%>
2525
{cluster_nodes, {[], <%= $rabbitmq::config::cluster_node_type %>}},
26-
<% } %>
26+
<%- } -%>
2727
{cluster_partition_handling, <%= $rabbitmq::config::cluster_partition_handling %>},
2828
<% } -%>
2929
{tcp_listen_options, [

0 commit comments

Comments
 (0)