Commit 8ba08c95 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #46906 from zhangxiaoyu-zidif/Add-testcase-for-namespace

Automatic merge from submit-queue (batch tested with PRs 47403, 46646, 46906, 46527, 46792) Add test case for namespace **What this PR does / why we need it**: Unit test case need add that when name is "". **Special notes for your reviewer**: refer to https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/namespace.go#L74 **Release note**: ```release-note NONE ```
parents 4a1d95ef ac1c513c
...@@ -54,6 +54,12 @@ func TestNamespaceGenerate(t *testing.T) { ...@@ -54,6 +54,12 @@ func TestNamespaceGenerate(t *testing.T) {
}, },
{ {
params: map[string]interface{}{ params: map[string]interface{}{
"name": "",
},
expectErr: true,
},
{
params: map[string]interface{}{
"name": nil, "name": nil,
}, },
expectErr: true, expectErr: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment