mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-27 05:04:52 +00:00
ParsePodFullName():code robustness
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user