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

Fix "ConsulAcl" provider when specified "id" doesn't exist #278

Merged
merged 1 commit into from
Feb 17, 2016

Conversation

legal90
Copy link
Contributor

@legal90 legal90 commented Feb 14, 2016

If the token ID doesn't exist, Diplomat::Acl#info returns an empty array and it causes an error:

           ================================================================================
       Error executing action `create` on resource 'consul_acl[vault]'
           ================================================================================

           NoMethodError
           -------------
           undefined method `select!' for nil:NilClass

           Cookbook Trace:
           ---------------
           /tmp/kitchen/cache/cookbooks/consul/libraries/consul_acl.rb:89:in `up_to_date?'
           /tmp/kitchen/cache/cookbooks/consul/libraries/consul_acl.rb:56:in `action_create'

This PR fixes that issue.

If the token ID doesn't exist, Diplomat::Acl#info returns an empty array.
@codecov-io
Copy link

Current coverage is 53.01%

Merging #278 into master will increase coverage by +3.80% as of 3c39a8c

@@            master    #278   diff @@
======================================
  Files            7       7       
  Stmts          380     381     +1
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit            187     202    +15
  Partial          0       0       
+ Missed         193     179    -14

Review entire Coverage Diff as of 3c39a8c

Powered by Codecov. Updated on successful CI builds.

johnbellone added a commit that referenced this pull request Feb 17, 2016
Fix "ConsulAcl" provider when specified "id" doesn't exist
@johnbellone johnbellone merged commit 74fe039 into sous-chefs:master Feb 17, 2016
@legal90 legal90 deleted the fix-acl branch April 21, 2016 13:50
@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants