diff --git a/kyaml/yaml/rnode_test.go b/kyaml/yaml/rnode_test.go index 506ccba9c9..f9688b25ad 100644 --- a/kyaml/yaml/rnode_test.go +++ b/kyaml/yaml/rnode_test.go @@ -403,7 +403,7 @@ func TestRNodeGetValidatedMetadata(t *testing.T) { "kind": "ConfigMap", }, rsExp: resultExpected{ - errMsg: "missing metadata.name", + errMsg: "missing metadata.name and metadata.generateName", }, }, "configmap": { @@ -458,6 +458,28 @@ func TestRNodeGetValidatedMetadata(t *testing.T) { }, }, }, + "jobGenerateName": { + theMap: map[string]interface{}{ + "apiVersion": "batch/v1", + "kind": "Job", + "metadata": map[string]interface{}{ + "generateName": "winnie-", + }, + }, + rsExp: resultExpected{ + out: ResourceMeta{ + TypeMeta: TypeMeta{ + APIVersion: "batch/v1", + Kind: "Job", + }, + ObjectMeta: ObjectMeta{ + NameMeta: NameMeta{ + GenerateName: "winnie-", + }, + }, + }, + }, + }, } for n := range testCases {