diff options
author | 2019-10-02 23:18:36 +0100 | |
---|---|---|
committer | 2019-10-02 15:18:36 -0700 | |
commit | 8fde7407d94feec02027de69d1ffa278ae0221ad (patch) | |
tree | ccaf4261e34bbf4d675ad6037e6b371207d04892 /plugin/clouddns/setup_test.go | |
parent | 0da2c0c366a583b192004052bd9484712b07a636 (diff) | |
download | coredns-8fde7407d94feec02027de69d1ffa278ae0221ad.tar.gz coredns-8fde7407d94feec02027de69d1ffa278ae0221ad.tar.zst coredns-8fde7407d94feec02027de69d1ffa278ae0221ad.zip |
plugin/clouddns: remove initialization from init (#3349)
* plugin/clouddns: remove initialization from init
Init should just call the plugin.Register with a setup function.
Fixes: #3343
Signed-off-by: Miek Gieben <miek@miek.nl>
* Fix placement for var f
Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/clouddns/setup_test.go')
-rw-r--r-- | plugin/clouddns/setup_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/clouddns/setup_test.go b/plugin/clouddns/setup_test.go index be9c51d92..6d2997298 100644 --- a/plugin/clouddns/setup_test.go +++ b/plugin/clouddns/setup_test.go @@ -9,7 +9,7 @@ import ( ) func TestSetupCloudDNS(t *testing.T) { - f := func(ctx context.Context, opt option.ClientOption) (gcpDNS, error) { + f = func(ctx context.Context, opt option.ClientOption) (gcpDNS, error) { return fakeGCPClient{}, nil } @@ -41,7 +41,7 @@ func TestSetupCloudDNS(t *testing.T) { for _, test := range tests { c := caddy.NewTestController("dns", test.body) - if err := setup(c, f); (err == nil) == test.expectedError { + if err := setup(c); (err == nil) == test.expectedError { t.Errorf("Unexpected errors: %v", err) } } |