mirror of
https://github.com/coredns/coredns.git
synced 2025-10-30 01:34:21 -04:00
middleware/kubernetes: define consts (#824)
Define two consts Pod and Svc, makes it stand out a little more when used in switches in case. We have opted for a new type, but then you need to convert them all the time with string(Foo).
This commit is contained in:
committed by
John Belamaric
parent
d0d7f4c89a
commit
21386ebdd5
@@ -128,7 +128,7 @@ func TestParseRequest(t *testing.T) {
|
||||
"endpoint": "",
|
||||
"service": "webs",
|
||||
"namespace": "mynamespace",
|
||||
"typeName": "svc",
|
||||
"typeName": Svc,
|
||||
"zone": "inter.webs.test",
|
||||
}
|
||||
for field, expected := range tcs {
|
||||
@@ -149,7 +149,7 @@ func TestParseRequest(t *testing.T) {
|
||||
"endpoint": "",
|
||||
"service": "*",
|
||||
"namespace": "any",
|
||||
"typeName": "svc",
|
||||
"typeName": Svc,
|
||||
"zone": "inter.webs.test",
|
||||
}
|
||||
for field, expected := range tcs {
|
||||
@@ -168,7 +168,7 @@ func TestParseRequest(t *testing.T) {
|
||||
"endpoint": "1-2-3-4",
|
||||
"service": "webs",
|
||||
"namespace": "mynamespace",
|
||||
"typeName": "svc",
|
||||
"typeName": Svc,
|
||||
"zone": "inter.webs.test",
|
||||
}
|
||||
for field, expected := range tcs {
|
||||
|
||||
Reference in New Issue
Block a user