Skip to content

Commit

Permalink
Add unit test to handle bug solved on PR #993
Browse files Browse the repository at this point in the history
  • Loading branch information
nosrio committed May 20, 2024
1 parent 55a0fd5 commit 40392c9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion spec/classes/rabbitmq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,22 @@
is_expected.to contain_file('rabbitmq.config').with('content' => %r{cluster_nodes.*\['rabbit@hare-1', 'rabbit@hare-2'\], ram})
end
end
end

describe 'without cluster_nodes and sets appropriate configuration ' do

Check failure on line 415 in spec/classes/rabbitmq_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

RSpec/ExcessiveDocstringSpacing: Excessive whitespace. (https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExcessiveDocstringSpacing)
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

Check failure on line 429 in spec/classes/rabbitmq_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

RSpec/EmptyLineAfterExampleGroup: Add an empty line after `context`. (https://rspec.rubystyle.guide/#empty-lines-between-describes, https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExampleGroup)
describe 'rabbitmq-env configuration' do
context 'with default params' do
it 'sets environment variables' do
Expand Down

0 comments on commit 40392c9

Please sign in to comment.