Commit graph

17 commits

Author SHA1 Message Date
Miek Gieben
7f46df6d27 tests: add SortAndCheck helper (#926)
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-08-16 15:30:58 +01:00
Miek Gieben
818d2b10ad cidr everywhere: check all middleware (#915)
* cidr everywhere: check all middleware

Add tests for cidr in only that middleware that already tests for this.
Check the other ones manually (and put reverse in the tests cases
anyway).

Make etcd setup_test run without +build etcd tag - it is not needed
for this test - move rest of the code to lookup_test.go.

Cleanup proxy test a bit and remove TempDir as there is test.TempFile
that does the same thing.

Fixes #909

* coredns package

* Fix test compile
2017-08-13 18:16:25 +01:00
Yong Tang
81af74aad0 Fix import path github.com/miekg/coredns -> github.com/coredns/coredns (#547)
This fix fixes import path from
`github.com/miekg/coredns`
->
`github.com/coredns/coredns`
2017-02-22 06:51:47 +00:00
Miek Gieben
713f10f6af middleware/etcd: reverse addresses (#162)
* middleware/etcd: reverse addresses

Implement reverse (PTR) addresses. Update the documentation on how to
configure test. Added tests as well.

Fixes: #157 #159

* Cleanup readme a little
2016-06-08 10:29:46 +01:00
Miek Gieben
a1e6cb7cf4 middleware/etcd: Use the correct endpoint
The endpoint for etcd as wrongly set if a proxy was configured.
Clean up some documentation in the process as well.
2016-04-19 12:52:05 +00:00
Miek Gieben
e979acba1b Implement NS queries to Etcd middleware
Copy and port the NS record stuff from SkyDNS. Slightly cleaner
implementation.
2016-04-13 08:03:56 +01:00
Miek Gieben
a441f93e0c Fix NODATA/NXDOMAIN for unknown types in etcd (#113)
* Finish the nodata stuff. See issue #9
* middleware/etc: add response to SOA queries
* Remove and add a few TODOs
2016-04-12 23:26:46 +01:00
Miek Gieben
31ce53f514 better (#104) 2016-04-11 10:22:27 +01:00
Miek Gieben
6eae17b0bd Add testing package
This already includes a bunch of helper functions that aid in testing.
Factor out etcd and file testing to use this package.

Fixes: #50
2016-03-28 10:49:28 +01:00
Miek Gieben
e62eb2cde0 Bugfix: bx in etcd.go didn't get Key
Thus record only diffing in the Key were seen as identical and not
included in the end results. Of course this being a map when and if
this would happen was rather random.

Fixed by including Key. Further small tweaks and code refactors.
2016-03-25 15:30:44 +00:00
Miek Gieben
e408c81a8c Add more tests and include the forgotten chaos_test.go as well 2016-03-25 10:32:12 +00:00
Miek Gieben
4fe39f9e9e Port tests from SkyDNS
This adds *most* of the tests from SkyDNS, things lacking is
the stubzone checking, groups and the trim prefix. These
will be added in subsequent PRs and in separate test files.
2016-03-24 17:31:01 +00:00
Miek Gieben
78d2e31ec1 Add Stub resolving
SkyDNS can forward requests from one instance to another.
Add this base infrastructure for this feature to CoreDNS.

Add more tests as well.
2016-03-24 09:20:53 +00:00
Miek Gieben
55aa436234 more stuff 2016-03-23 23:06:16 +00:00
Miek Gieben
a655a5735b Slowly adding all the tests from skydns 2016-03-23 22:59:05 +00:00
Miek Gieben
bae1fb7aa2 Add build tag to the tests 2016-03-23 10:46:33 +00:00
Miek Gieben
8f9f2cd1ab Add etcd middleware
This middleware acts in the same way as SkyDNS. We might add options
to allow it to be behave different, but for now it will suffice.

A Corefile like:
.:1053 {
    etcd miek.nl
    proxy . 8.8.8.8:53
}
will perform lookup in etcd and proxy everything not miek.nl to Google
for further resolution.

The internal etcd forwarding *also* uses the proxy infrastructure,
meaning you get health check and such for (almost) free
2016-03-23 10:41:40 +00:00