Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defined policies and disabled_policies as [] to avoid nil:NilClass error #399

Merged
merged 1 commit into from
Nov 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@
# heartbeat
default['rabbitmq']['heartbeat'] = 580

# per default all policies and disabled policies are empty but need to be
# defined
default['rabbitmq']['policies'] = []
default['rabbitmq']['disabled_policies'] = []

# Example HA policies
# default['rabbitmq']['policies']['ha-all']['pattern'] = '^(?!amq\\.).*'
# default['rabbitmq']['policies']['ha-all']['params'] = { 'ha-mode' => 'all' }
Expand All @@ -154,8 +159,6 @@
# default['rabbitmq']['policies']['ha-two']['pattern'] = '^two.'
# default['rabbitmq']['policies']['ha-two']['params'] = { 'ha-mode' => 'exactly', 'ha-params' => 2 }
# default['rabbitmq']['policies']['ha-two']['priority'] = 1
#
# default['rabbitmq']['disabled_policies'] = []

# conf
default['rabbitmq']['conf'] = {}
Expand Down
1 change: 0 additions & 1 deletion spec/policy_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
node.set['rabbitmq']['policies']['ha-two']['pattern'] = '^two.'
node.set['rabbitmq']['policies']['ha-two']['params'] = { 'ha-mode' => 'exactly', 'ha-params' => 2 }
node.set['rabbitmq']['policies']['ha-two']['priority'] = 1
node.set['rabbitmq']['disabled_policies'] = []
runner.converge(described_recipe)
end

Expand Down