aboutsummaryrefslogtreecommitdiff
path: root/plugin/etcd/cname_test.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-01-28plugin/etcd: Filter empty host field by qtype (#2499)Gravatar Carl-Magnus Björkell 1-0/+8
When a query, different from a TXT lookup is performed, all services with a missing `Host` field should be filtered out, as these otherwize cause a line in the answer section with a single dot (`.`) as the result. This behavior manifests for example when a TXT record is present on a domain, eg. an A or SRV lookup is performed on said domain. If there are no services containing a `Host` field, a `NODATA` response should be given. If there are other Services, these alone should be returned for the query. Filter any service that has an empty Host field from all lookup types other than TXT to solve this issue. At the same time the check for empty `Text` fields in TXT queries are also moved to the same check in the etcd ServiceBackend.
2019-01-19Stop importing testing in the main binary (#2479)Gravatar Miek Gieben 1-9/+9
* Stop importing testing in the main binary Stop importing "testing" into the main binary: * test/helpers.go imported it; remote that and change function signature * update all tests that use this Signed-off-by: Miek Gieben <miek@miek.nl> * Drop import testing from metrics plugin Signed-off-by: Miek Gieben <miek@miek.nl> * more fiddling Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-31plugin/etcd: propagate recursion flag properly (#2254)Gravatar Carl-Magnus Björkell 1-0/+7
When fetching records via the etcd plugin, the recursion flag was never set properly according to if the caller requested an exact record match or not. This cause problems especially in CNAME lookups, where recursion took place and a random RR was returned instead of the one that was specifically added for this key. Even when there is no service attached on the given path, it is still wrong to return a random one from the recursion. Fixing by using the `exact` flag to decide if recursion should be done.
2018-06-02presubmit: Check errorf as well (#1845)Gravatar Miek Gieben 1-1/+1
Uppercase all these test errors as well. And extend the presubmit to check for these in the future. Also do a slightly smarter grep to only get t.<something>. as (because dump regexp) this also grep over non test files.
2017-09-21pkg: add dnstest (#1098)Gravatar Miek Gieben 1-2/+2
Add a full test server impl in this new package + tests. Move dnsrecorder into this package as well and finish up the commented out tests that were left in the old dnsrecorder package. Update all callers and tests.
2017-09-16More Middleware -> Plugin conversions (#1088)Gravatar Miek Gieben 1-1/+1
Forgot about these.
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 1-0/+79
* 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