diff options
Diffstat (limited to 'plugin/transfer/setup_test.go')
-rw-r--r-- | plugin/transfer/setup_test.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugin/transfer/setup_test.go b/plugin/transfer/setup_test.go index dfbbc3950..d46eec17c 100644 --- a/plugin/transfer/setup_test.go +++ b/plugin/transfer/setup_test.go @@ -6,12 +6,6 @@ import ( "github.com/coredns/caddy" ) -func newTestControllerWithZones(input string, zones []string) *caddy.Controller { - ctr := caddy.NewTestController("dns", input) - ctr.ServerBlockKeys = append(ctr.ServerBlockKeys, zones...) - return ctr -} - func TestParse(t *testing.T) { tests := []struct { input string @@ -75,8 +69,10 @@ func TestParse(t *testing.T) { }, } for i, tc := range tests { - c := newTestControllerWithZones(tc.input, tc.zones) - transfer, err := parse(c) + c := caddy.NewTestController("dns", tc.input) + c.ServerBlockKeys = append(c.ServerBlockKeys, tc.zones...) + + transfer, err := parseTransfer(c) if err == nil && tc.shouldErr { t.Fatalf("Test %d expected errors, but got no error", i) |