diff options
author | 2017-06-14 09:37:10 -0700 | |
---|---|---|
committer | 2017-06-14 09:37:10 -0700 | |
commit | e49ca86ce463395f7d0d2b997c93d25e3d101ca0 (patch) | |
tree | 9457aa245a6ccc278a296d341370eae99e1f78b2 /middleware/kubernetes/setup_test.go | |
parent | 5c10eba31c17dcc5d95431e655280fff19979a34 (diff) | |
download | coredns-e49ca86ce463395f7d0d2b997c93d25e3d101ca0.tar.gz coredns-e49ca86ce463395f7d0d2b997c93d25e3d101ca0.tar.zst coredns-e49ca86ce463395f7d0d2b997c93d25e3d101ca0.zip |
cleanup: go vet and golint run (#736)
* cleanup: go vet and golint run
Various cleanups trickered by go vet and golint.
* Fix tests and lowercase all errors
Lowercase all errors, some tests in kubernetes use errors from
kubernetes which do start with a capital letter.
Diffstat (limited to 'middleware/kubernetes/setup_test.go')
-rw-r--r-- | middleware/kubernetes/setup_test.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/middleware/kubernetes/setup_test.go b/middleware/kubernetes/setup_test.go index d150daba9..8414d76fd 100644 --- a/middleware/kubernetes/setup_test.go +++ b/middleware/kubernetes/setup_test.go @@ -223,7 +223,7 @@ func TestKubernetesParse(t *testing.T) { "no kubernetes keyword", "", true, - "Kubernetes setup called without keyword 'kubernetes' in Corefile", + "kubernetes setup called without keyword 'kubernetes' in Corefile", -1, -1, defaultResyncPeriod, @@ -255,7 +255,7 @@ func TestKubernetesParse(t *testing.T) { endpoint }`, true, - "Wrong argument count or unexpected line ending after 'endpoint'", + "rong argument count or unexpected line ending", -1, -1, defaultResyncPeriod, @@ -272,7 +272,7 @@ func TestKubernetesParse(t *testing.T) { namespaces }`, true, - "Parse error: Wrong argument count or unexpected line ending after 'namespaces'", + "rong argument count or unexpected line ending", -1, -1, defaultResyncPeriod, @@ -289,7 +289,7 @@ func TestKubernetesParse(t *testing.T) { resyncperiod }`, true, - "Wrong argument count or unexpected line ending after 'resyncperiod'", + "rong argument count or unexpected line ending", -1, 0, 0 * time.Minute, @@ -306,7 +306,7 @@ func TestKubernetesParse(t *testing.T) { resyncperiod 15 }`, true, - "Unable to parse resync duration value. Value provided was ", + "unable to parse resync duration value", -1, 0, 0 * time.Second, @@ -323,7 +323,7 @@ func TestKubernetesParse(t *testing.T) { resyncperiod abc }`, true, - "Unable to parse resync duration value. Value provided was ", + "unable to parse resync duration value", -1, 0, 0 * time.Second, @@ -340,7 +340,7 @@ func TestKubernetesParse(t *testing.T) { labels }`, true, - "Wrong argument count or unexpected line ending after 'labels'", + "rong argument count or unexpected line ending", -1, 0, 0 * time.Second, @@ -357,7 +357,7 @@ func TestKubernetesParse(t *testing.T) { labels environment in (production, qa }`, true, - "Unable to parse label selector. Value provided was", + "unable to parse label selector", -1, 0, 0 * time.Second, @@ -429,7 +429,7 @@ func TestKubernetesParse(t *testing.T) { pods giant_seed }`, true, - "Value for pods must be one of: disabled, verified, insecure", + "rong value for pods", -1, 0, defaultResyncPeriod, @@ -460,12 +460,12 @@ func TestKubernetesParse(t *testing.T) { }, // cidrs ok { - "Invalid cidr: hard", + "invalid cidr: hard", `kubernetes coredns.local { cidrs hard dry }`, true, - "Invalid cidr: hard", + "invalid cidr: hard", -1, 0, defaultResyncPeriod, @@ -483,7 +483,7 @@ func TestKubernetesParse(t *testing.T) { fallthrough junk }`, true, - "Wrong argument count", + "rong argument count", -1, 0, defaultResyncPeriod, @@ -559,7 +559,7 @@ func TestKubernetesParse(t *testing.T) { federation starship }`, true, - `Incorrect number of arguments for federation. Got 1, expect 2.`, + `incorrect number of arguments for federation`, -1, 0, defaultResyncPeriod, |