test/examples_test.go: validate docs/user-guide/pod-security-policy/psp.yaml (#3100)
This commit is contained in:
committed by
Andrew Chen
parent
f487ce2510
commit
8aad74ec5b
@@ -134,6 +134,8 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
||||
t.Namespace = api.NamespaceDefault
|
||||
}
|
||||
errors = expvalidation.ValidateDaemonSet(t)
|
||||
case *extensions.PodSecurityPolicy:
|
||||
errors = expvalidation.ValidatePodSecurityPolicy(t)
|
||||
case *batch.CronJob:
|
||||
if t.Namespace == "" {
|
||||
t.Namespace = api.NamespaceDefault
|
||||
@@ -226,6 +228,9 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"kitten-rc": {&api.ReplicationController{}},
|
||||
"nautilus-rc": {&api.ReplicationController{}},
|
||||
},
|
||||
"../docs/user-guide/pod-security-policy": {
|
||||
"psp": {&extensions.PodSecurityPolicy{}},
|
||||
},
|
||||
"../docs/user-guide/persistent-volumes/volumes": {
|
||||
"local-01": {&api.PersistentVolume{}},
|
||||
"local-02": {&api.PersistentVolume{}},
|
||||
|
||||
Reference in New Issue
Block a user