mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 17:24:20 -04:00
plugin/metadata: some cleanups (#1906)
* plugin/metadata: some cleanups Name to provider.go as that's what being defined right now in the file. Use request.Request because that's done in variables.go anyway. Name the main storage M, because there is no further meaning behind. Remove superfluous methods Signed-off-by: Miek Gieben <miek@miek.nl> * Fix test Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/coredns/coredns/plugin/test"
|
||||
"github.com/coredns/coredns/request"
|
||||
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
@@ -63,8 +65,9 @@ func TestGetValue(t *testing.T) {
|
||||
m := new(dns.Msg)
|
||||
m.SetQuestion("example.com.", dns.TypeA)
|
||||
m.Question[0].Qclass = dns.ClassINET
|
||||
state := request.Request{W: &test.ResponseWriter{}, Req: m}
|
||||
|
||||
value, err := GetValue(tc.varName, &test.ResponseWriter{}, m)
|
||||
value, err := GetValue(state, tc.varName)
|
||||
|
||||
if tc.shouldErr && err == nil {
|
||||
t.Errorf("Test %d: Expected error, but didn't recieve", i)
|
||||
|
||||
Reference in New Issue
Block a user