mw/kubernetes: remove zone from parseRequest (#938)

* mw/kubernetes: remove zone from parseRequest

State has the zone info as well, so don't need to have it in
parseRequest anymore.

* Fix up tests

* improve test coverage
This commit is contained in:
Miek Gieben 2017-08-19 07:18:35 +01:00 committed by GitHub
parent f96cf27193
commit 627687b11f
3 changed files with 12 additions and 10 deletions

View file

@ -19,17 +19,23 @@ func TestParseRequest(t *testing.T) {
{
// valid SRV request
"_http._tcp.webs.mynamespace.svc.inter.webs.test.", dns.TypeSRV,
"http.tcp..webs.mynamespace.svc.intern.webs.tests.",
"http.tcp..webs.mynamespace.svc",
},
{
// wildcard acceptance
"*.any.*.any.svc.inter.webs.test.", dns.TypeSRV,
"*.any..*.any.svc.intern.webs.tests.",
"*.any..*.any.svc",
},
{
// A request of endpoint
"1-2-3-4.webs.mynamespace.svc.inter.webs.test.", dns.TypeA,
"..1-2-3-4.webs.mynamespace.svc.intern.webs.tests.",
"..1-2-3-4.webs.mynamespace.svc",
},
{
// 3 segments
"webs.mynamespace.svc.inter.webs.test.", dns.TypeSRV,
"*...webs.mynamespace.svc",
},
}
for i, tc := range tests {