diff options
author | 2016-08-08 21:42:39 -0700 | |
---|---|---|
committer | 2016-08-08 21:42:39 -0700 | |
commit | 3b7b9b49d5d4a94dcb924b90595bbfd976f0d87c (patch) | |
tree | 9383afa86e578db4c402c092c15382cb7651491a /middleware/etcd/proxy_lookup_test.go | |
parent | b53661d223f6474f2135a931bb219aa255e318c1 (diff) | |
download | coredns-3b7b9b49d5d4a94dcb924b90595bbfd976f0d87c.tar.gz coredns-3b7b9b49d5d4a94dcb924b90595bbfd976f0d87c.tar.zst coredns-3b7b9b49d5d4a94dcb924b90595bbfd976f0d87c.zip |
Fix lookup test (#206)
* Always continue
* debug queries: more sane impl
This PR just add a msg.Service to debug instead of crafting an TXT RR
at that point. This way we lift on the normal way of generating debug
responses and don't muck with that implementation.
The tags=etcd is flaky as hell for some reason.
Diffstat (limited to 'middleware/etcd/proxy_lookup_test.go')
-rw-r--r-- | middleware/etcd/proxy_lookup_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/middleware/etcd/proxy_lookup_test.go b/middleware/etcd/proxy_lookup_test.go index 868bf80d6..2a52cba06 100644 --- a/middleware/etcd/proxy_lookup_test.go +++ b/middleware/etcd/proxy_lookup_test.go @@ -22,10 +22,10 @@ func TestProxyLookupFailDebug(t *testing.T) { prxy := etc.Proxy etc.Proxy = proxy.New([]string{"127.0.0.0:154"}) - etc.Debug = true + defer func() { etc.Proxy = prxy }() + etc.Debug = true defer func() { etc.Debug = false }() - defer func() { etc.Proxy = prxy }() for _, tc := range dnsTestCasesProxy { m := tc.Msg() @@ -58,20 +58,20 @@ func TestProxyLookupFailDebug(t *testing.T) { } } -// Note the key is encoded as DNS name, while in "reality" it is a etcd path. var servicesProxy = []*msg.Service{ {Host: "www.example.org", Key: "a.dom.skydns.test."}, } var dnsTestCasesProxy = []test.Case{ { - Qname: "dom.skydns.test.", Qtype: dns.TypeSRV, + Qname: "o-o.debug.dom.skydns.test.", Qtype: dns.TypeSRV, Answer: []dns.RR{ test.SRV("dom.skydns.test. 300 IN SRV 10 100 0 www.example.org."), }, Extra: []dns.RR{ - test.TXT(". 0 CH TXT \"www.example.org. IN A: unreachable backend\""), - test.TXT(". 0 CH TXT \"www.example.org. IN AAAA: unreachable backend\""), + test.TXT("a.dom.skydns.test. 300 CH TXT \"www.example.org:0(10,0,,false)[0,]\""), + test.TXT("www.example.org. 0 CH TXT \"www.example.org.:0(0,0, IN A: unreachable backend,false)[0,]\""), + test.TXT("www.example.org. 0 CH TXT \"www.example.org.:0(0,0, IN AAAA: unreachable backend,false)[0,]\""), }, }, } |