aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/namespace_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-04-08 11:13:46 +0100
committerGravatar GitHub <noreply@github.com> 2019-04-08 11:13:46 +0100
commit58c703f5ef212e3c9efbe31fa4d9332eb268ff0d (patch)
tree3112337a52a83c8fbd0c415c4eb584926a7a68e1 /plugin/kubernetes/namespace_test.go
parente3f9a80b1d5a112907a012acee276e9080b32852 (diff)
downloadcoredns-58c703f5ef212e3c9efbe31fa4d9332eb268ff0d.tar.gz
coredns-58c703f5ef212e3c9efbe31fa4d9332eb268ff0d.tar.zst
coredns-58c703f5ef212e3c9efbe31fa4d9332eb268ff0d.zip
Run gofmt -w -s on codebase (#2773)
This formats and simplifies all code by running gofmt -w -s on all Go files. Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/kubernetes/namespace_test.go')
-rw-r--r--plugin/kubernetes/namespace_test.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/plugin/kubernetes/namespace_test.go b/plugin/kubernetes/namespace_test.go
index d7d2cbcce..c302b42ac 100644
--- a/plugin/kubernetes/namespace_test.go
+++ b/plugin/kubernetes/namespace_test.go
@@ -5,13 +5,13 @@ import (
)
func TestFilteredNamespaceExists(t *testing.T) {
- tests := []struct{
+ tests := []struct {
expected bool
kubernetesNamespaces map[string]struct{}
testNamespace string
}{
- {true, map[string]struct{}{}, "foobar" },
- {false, map[string]struct{}{}, "nsnoexist" },
+ {true, map[string]struct{}{}, "foobar"},
+ {false, map[string]struct{}{}, "nsnoexist"},
}
k := Kubernetes{}
@@ -26,15 +26,15 @@ func TestFilteredNamespaceExists(t *testing.T) {
}
func TestNamespaceExposed(t *testing.T) {
- tests := []struct{
+ tests := []struct {
expected bool
kubernetesNamespaces map[string]struct{}
testNamespace string
}{
- {true, map[string]struct{}{ "foobar": {} }, "foobar" },
- {false, map[string]struct{}{ "foobar": {} }, "nsnoexist" },
- {true, map[string]struct{}{}, "foobar" },
- {true, map[string]struct{}{}, "nsnoexist" },
+ {true, map[string]struct{}{"foobar": {}}, "foobar"},
+ {false, map[string]struct{}{"foobar": {}}, "nsnoexist"},
+ {true, map[string]struct{}{}, "foobar"},
+ {true, map[string]struct{}{}, "nsnoexist"},
}
k := Kubernetes{}
@@ -49,15 +49,15 @@ func TestNamespaceExposed(t *testing.T) {
}
func TestNamespaceValid(t *testing.T) {
- tests := []struct{
+ tests := []struct {
expected bool
kubernetesNamespaces map[string]struct{}
testNamespace string
}{
- {true, map[string]struct{}{ "foobar": {} }, "foobar" },
- {false, map[string]struct{}{ "foobar": {} }, "nsnoexist" },
- {true, map[string]struct{}{}, "foobar" },
- {false, map[string]struct{}{}, "nsnoexist" },
+ {true, map[string]struct{}{"foobar": {}}, "foobar"},
+ {false, map[string]struct{}{"foobar": {}}, "nsnoexist"},
+ {true, map[string]struct{}{}, "foobar"},
+ {false, map[string]struct{}{}, "nsnoexist"},
}
k := Kubernetes{}