aboutsummaryrefslogtreecommitdiff
path: root/middleware/file/ent_test.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 1-159/+0
* Rename middleware to plugin first pass; mostly used 'sed', few spots where I manually changed text. This still builds a coredns binary. * fmt error * Rename AddMiddleware to AddPlugin * Readd AddMiddleware to remain backwards compat
2017-08-16tests: add SortAndCheck helper (#926)Gravatar Miek Gieben 1-20/+1
There was quite some code duplication in a lot of tests to check if an answer was considered Ok. Created a test.SortAndCheck helper function that takes care of this.
2017-06-08middleware/file: don't reload zone when SOA isn't changed (#707)Gravatar Miek Gieben 1-1/+1
* middleware/file: don't reload zone when SOA isn't changed Give Parse an extra argument which is the SOA's serial, if > 0 we check against the just parsed SOA and then just return. Most notable use is in reload.go which is both used in the file and auto middleware. Fixes #415 * PR comments
2017-02-22Fix import path `github.com/miekg/coredns` -> `github.com/coredns/coredns` ↵Gravatar Yong Tang 1-2/+2
(#547) This fix fixes import path from `github.com/miekg/coredns` -> `github.com/coredns/coredns`
2016-11-05middleware/file: fix delegations (#376)Gravatar Miek Gieben 1-1/+2
Fix the delegation handling in the *file* and *dnssec* middleware. Refactor tests a bit and show that they are failling. Add a Tree printer, cleanups and tests. Fix wildcard test - should get no answer from empty-non-terminal
2016-09-07Cleanup: put middleware helper functions in pkgs (#245)Gravatar Miek Gieben 1-3/+3
Move all (almost all) Go files in middleware into their own packages. This makes for better naming and discoverability. Lot of changes elsewhere to make this change. The middleware.State was renamed to request.Request which is better, but still does not cover all use-cases. It was also moved out middleware because it is used by `dnsserver` as well. A pkg/dnsutil packages was added for shared, handy, dns util functions. All normalize functions are now put in normalize.go
2016-04-11Rename middleware/testing (#103)Gravatar Miek Gieben 1-17/+17
Rename to test and name the toplevel tests dir to test for consitency.
2016-04-09correct EDNS responses (#96)Gravatar Miek Gieben 1-0/+1
Tests updated as well and all the middleware. And Prometheus renamed to metrics (directive is still prometheus).
2016-04-04Cache elements of StateGravatar Miek Gieben 1-1/+1
Cache the size and the do bit whenever someone asked for it. We can probably add more: PASS BenchmarkStateDo-4 100000000 11.9 ns/op BenchmarkStateSize-4 5000000 265 ns/op ok github.com/miekg/coredns/middleware 2.828s PASS BenchmarkStateDo-4 1000000000 2.86 ns/op BenchmarkStateSize-4 500000000 3.10 ns/op ok github.com/miekg/coredns/middleware 5.032s This PR also includes some testing cleanups as well.
2016-04-02empty non-terminal supportGravatar Miek Gieben 1-0/+176
When looking for a name in tree, return wether we got to a longer one - if so we had an ent. Add tests + dnssec tests and refactor the tests as well a bit.