The default port is used when there is no port number for k8s (#2598)

* k8s 没有端口号时使用默认端口

* Modify the not port test
This commit is contained in:
bigrocs
2022-11-27 09:00:11 +08:00
committed by GitHub
parent b1c3c21c81
commit 90828a0d4a
3 changed files with 29 additions and 17 deletions

View File

@@ -39,9 +39,12 @@ func TestParseTarget(t *testing.T) {
hasErr: true,
},
{
name: "no port, no colon",
input: "k8s://ns1/my-svc",
hasErr: true,
name: "no port, no colon",
input: "k8s://ns1/my-svc",
expect: Service{
Namespace: "ns1",
Name: "my-svc",
},
},
{
name: "bad port",