* write failures with ResponseReverter instead of letting server write them
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* fix comment
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* Clean up tests logging
This cleans up the travis logs so you can see the failures better.
Older tests in tests/ would call log.SetOutput(ioutil.Discard) in
a haphazard way. This add log.Discard and put an `init` function in each
package's dir (no way to do this globally). The cleanup in tests/ is
clear.
All plugins also got this init function to have some uniformity and kill
any (future) logging there in the tests as well.
There is a one-off in pkg/healthcheck because that does log.
Signed-off-by: Miek Gieben <miek@miek.nl>
* bring back original log_test.go
Signed-off-by: Miek Gieben <miek@miek.nl>
* suppress logging here as well
Signed-off-by: Miek Gieben <miek@miek.nl>
* tests: CoreDNSServerAndPorts
Copy from kubernetes.go and renamed to fit the style, adapted almost
all callers.
This is a mechanicl change, no testdata was changed.
* typos
* Add edns0 code rewrite
* check arg count
* change `new`; set EDNS0 if request doesn't have it set
* change set to replace_or_append
* change to append_or_replace
* return error in new
* update documents
* fixt UT
* return error
* go fmt
* Rework for more general EDNS0 use
Also changed how rules are created and validated. Implements
EDNS0 NSID in addition to local.
* go fmt
* README updates, NSID tests and fixes
* gofmt -s -w
* Fix tests for rewrite syntax change
* Add tests, fix error message
* Review nits
* Missed on nit
* More tests, integration test, fix edns0 parse issue
* Fix README, use RewriteIgnored
* go fmt