From 2fd31cd3e033161982e19a19bd132d2c5c59ea42 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Fri, 29 Jun 2018 15:03:25 +0100 Subject: 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 * Fix test Signed-off-by: Miek Gieben --- plugin/pkg/variables/variables_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugin/pkg/variables/variables_test.go') diff --git a/plugin/pkg/variables/variables_test.go b/plugin/pkg/variables/variables_test.go index 939add323..e0ff64c19 100644 --- a/plugin/pkg/variables/variables_test.go +++ b/plugin/pkg/variables/variables_test.go @@ -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) -- cgit v1.2.3