Rename middleware/testing (#103)
Rename to test and name the toplevel tests dir to test for consitency.
This commit is contained in:
parent
0ea2a6088d
commit
4829b40efa
21 changed files with 261 additions and 261 deletions
|
@ -15,7 +15,7 @@ import (
|
|||
"github.com/miekg/coredns/middleware/etcd/msg"
|
||||
"github.com/miekg/coredns/middleware/etcd/singleflight"
|
||||
"github.com/miekg/coredns/middleware/proxy"
|
||||
coretest "github.com/miekg/coredns/middleware/testing"
|
||||
"github.com/miekg/coredns/middleware/test"
|
||||
|
||||
etcdc "github.com/coreos/etcd/client"
|
||||
"golang.org/x/net/context"
|
||||
|
@ -66,7 +66,7 @@ func TestLookup(t *testing.T) {
|
|||
for _, tc := range dnsTestCases {
|
||||
m := tc.Msg()
|
||||
|
||||
rec := middleware.NewResponseRecorder(&coretest.ResponseWriter{})
|
||||
rec := middleware.NewResponseRecorder(&test.ResponseWriter{})
|
||||
_, err := etc.ServeDNS(ctx, rec, m)
|
||||
if err != nil {
|
||||
t.Errorf("expected no error, got %v\n", err)
|
||||
|
@ -74,21 +74,21 @@ func TestLookup(t *testing.T) {
|
|||
}
|
||||
resp := rec.Msg()
|
||||
|
||||
sort.Sort(coretest.RRSet(resp.Answer))
|
||||
sort.Sort(coretest.RRSet(resp.Ns))
|
||||
sort.Sort(coretest.RRSet(resp.Extra))
|
||||
sort.Sort(test.RRSet(resp.Answer))
|
||||
sort.Sort(test.RRSet(resp.Ns))
|
||||
sort.Sort(test.RRSet(resp.Extra))
|
||||
|
||||
if !coretest.Header(t, tc, resp) {
|
||||
if !test.Header(t, tc, resp) {
|
||||
t.Logf("%v\n", resp)
|
||||
continue
|
||||
}
|
||||
if !coretest.Section(t, tc, coretest.Answer, resp.Answer) {
|
||||
if !test.Section(t, tc, coretest.Answer, resp.Answer) {
|
||||
t.Logf("%v\n", resp)
|
||||
}
|
||||
if !coretest.Section(t, tc, coretest.Ns, resp.Ns) {
|
||||
if !test.Section(t, tc, coretest.Ns, resp.Ns) {
|
||||
t.Logf("%v\n", resp)
|
||||
}
|
||||
if !coretest.Section(t, tc, coretest.Extra, resp.Extra) {
|
||||
if !test.Section(t, tc, coretest.Extra, resp.Extra) {
|
||||
t.Logf("%v\n", resp)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue