ParsePodFullName():code robustness

This commit is contained in:
zhangxiaoyu-zidif
2017-05-11 19:14:16 +08:00
parent 3fbfafdd0a
commit 65080ea1c1
2 changed files with 2 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ func TestParsePodFullName(t *testing.T) {
"bar.org_foo.com": {Name: "bar.org", Namespace: "foo.com"},
"bar-bar_foo": {Name: "bar-bar", Namespace: "foo"},
}
failedCases := []string{"barfoo", "bar_foo_foo", ""}
failedCases := []string{"barfoo", "bar_foo_foo", "", "bar_", "_foo"}
for podFullName, expected := range successfulCases {
name, namespace, err := kubecontainer.ParsePodFullName(podFullName)