-
Notifications
You must be signed in to change notification settings - Fork 170
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
Avoid nameserver duplication #636
Conversation
spec/resty/resolver_spec.lua
Outdated
@@ -179,11 +179,12 @@ nameserver 127.0.0.1 | |||
end) | |||
|
|||
it('returns nameserver touples', function() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this deserves a new test. Because it basically changes it so we don't have a test for the order of returned nameservers from a normal file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Also, I think that we have similar problems with other tests. For example, this test is checking that commented lines are ignored, but there isn't an it
clause explaining that or an explicit assertion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in e2755eb
--- user_files | ||
>>> resolv.conf | ||
nameserver 127.0.1.1 | ||
nameserver 1.2.3.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline at the end of the file. Would be good to set-up your editor to always keep a new-line at the EOF.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 3afea98
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). | |||
|
|||
- Error loading policy chain configuration JSON with null value [PR #626](https://github.com/3scale/apicast/pull/626) | |||
- Splitted `resolv.conf` in lines,to avoid commented lines [PR #618](https://github.com/3scale/apicast/pull/618) | |||
- Avoid `nameserver` repetion from `RESOLVER` variable and `resolv.conf` file [PR #636](https://github.com/3scale/apicast/pull/636) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
assert.same({ '127.0.0.1', 53 }, nameservers[2]) | ||
end) | ||
|
||
it('do not replicates nameservers from resolver env var', function() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
👍 Thanks for your contribution @maneta |
correct
server == resolver
case in #630