diff options
Diffstat (limited to 'plugin/kubernetes/namespace_test.go')
-rw-r--r-- | plugin/kubernetes/namespace_test.go | 26 |
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{} |