Conversation
c5e543f to
7ff6d2c
Compare
83f6fc5 to
d5bb79c
Compare
35f68e9 to
cd6db9b
Compare
truthbk
requested changes
Jul 10, 2017
Member
truthbk
left a comment
There was a problem hiding this comment.
Just a small issue with the test - can you double-check that? Nice job 👍
| acl_token = instance.get('acl_token', None) | ||
|
|
||
| headers = {} | ||
| if acl_token is not None: |
Member
There was a problem hiding this comment.
this could be, I don't think we need to check if it's not None...
if acl_token:
# blah...
| sh %( docker run -d --expose 8301 --expose 8500 -p 8500:8500 --name #{container_name_1} \ | ||
| sh %( docker create --expose 8301 --expose 8500 -p 8500:8500 --name #{container_name_1} \ | ||
| consul:#{consul_version} agent -dev -bind=0.0.0.0 -client=0.0.0.0 ) | ||
| sh %( docker cp #{__dir__}/server.json #{container_name_1}:/consul/config/server.json ) |
Member
There was a problem hiding this comment.
Nice job with the test infastructure setup! 🍰
| try: | ||
| self.run_check(config) | ||
| except HTTPError as e: | ||
| if e.errno == 403: |
Member
There was a problem hiding this comment.
@zippolyte we should actually assert the e.errno == 403 to confirm the test is working as expected, otherwise if there were no exception, this test would also pass although the acl_token was actually bad.
This was referenced Jul 12, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Enable ACL authentication by passing the header
X-Consul-Tokento the request. See https://www.consul.io/api/index.html#aclsMotivation
Feature request
Versioning
manifest.jsonCHANGELOG.mdAdditional Notes
Will need to modify the flare so that the token in the yaml is sanitized.