Skip to content

Commit 6fc72c0

Browse files
committed
Fix examples test for newly changed example manifest
The newly changed `my-scheduler.yaml` breaks the test case. This PR fixes it.
1 parent 4e761ce commit 6fc72c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

content/en/examples/examples_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
320320
case *rbac.ClusterRoleBinding:
321321
// clusterolebinding does not accept namespace
322322
errors = rbac_validation.ValidateClusterRoleBinding(t)
323+
case *rbac.RoleBinding:
324+
errors = rbac_validation.ValidateRoleBinding(t)
323325
case *storage.StorageClass:
324326
// storageclass does not accept namespace
325327
errors = storage_validation.ValidateStorageClass(t)
@@ -454,7 +456,7 @@ func TestExampleObjectSchemas(t *testing.T) {
454456
},
455457
"admin/sched": {
456458
"clusterrole": {&rbac.ClusterRole{}},
457-
"my-scheduler": {&api.ServiceAccount{}, &rbac.ClusterRoleBinding{}, &rbac.ClusterRoleBinding{}, &api.ConfigMap{}, &apps.Deployment{}},
459+
"my-scheduler": {&api.ServiceAccount{}, &rbac.ClusterRoleBinding{}, &rbac.ClusterRoleBinding{}, &rbac.RoleBinding{}, &api.ConfigMap{}, &apps.Deployment{}},
458460
"pod1": {&api.Pod{}},
459461
"pod2": {&api.Pod{}},
460462
"pod3": {&api.Pod{}},

0 commit comments

Comments
 (0)