Commit graph

5 commits

Author SHA1 Message Date
Chris O'Haver
911891f485
plugin/rewrite: Write failures with ResponseReverter (#5150)
* 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>
2022-02-01 16:54:06 -05:00
Ambrose Chua
ed1f42cf56
Fix mixed indentation within tests (#3855)
Signed-off-by: Ambrose Chua <ambrose@chua.family>
2020-04-25 08:08:36 +02:00
Miek Gieben
f3134da45e
Clean up tests logging (#1979)
* 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>
2018-07-19 16:23:06 +01:00
Miek Gieben
f901b0cefa tests: CoreDNSServerAndPorts (#972)
* 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
2017-08-24 11:35:14 +01:00
John Belamaric
ef315ef3e2 Rewrite edns0 (#561)
* 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
2017-03-06 21:32:17 +00:00