Fix CI gate
This commit is contained in:
@@ -343,6 +343,7 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"two-container-pod": {&api.Pod{}},
|
||||
},
|
||||
"../docs/tasks/administer-cluster": {
|
||||
"busybox": {&api.Pod{}},
|
||||
"cloud-controller-manager-daemonset-example": {&api.ServiceAccount{}, &rbac.ClusterRoleBinding{}, &extensions.DaemonSet{}},
|
||||
"cpu-constraints": {&api.LimitRange{}},
|
||||
"cpu-constraints-pod": {&api.Pod{}},
|
||||
@@ -384,6 +385,8 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"cpu-request-limit": {&api.Pod{}},
|
||||
"cpu-request-limit-2": {&api.Pod{}},
|
||||
"exec-liveness": {&api.Pod{}},
|
||||
"extended-resource-pod": {&api.Pod{}},
|
||||
"extended-resource-pod-2": {&api.Pod{}},
|
||||
"http-liveness": {&api.Pod{}},
|
||||
"init-containers": {&api.Pod{}},
|
||||
"lifecycle-events": {&api.Pod{}},
|
||||
@@ -460,6 +463,7 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"deployment-patch-demo": {&extensions.Deployment{}},
|
||||
"deployment-scale": {&extensions.Deployment{}},
|
||||
"deployment-update": {&extensions.Deployment{}},
|
||||
"hpa-php-apache": {&autoscaling.HorizontalPodAutoscaler{}},
|
||||
"mysql-configmap": {&api.ConfigMap{}},
|
||||
"mysql-deployment": {&api.Service{}, &api.PersistentVolumeClaim{}, &extensions.Deployment{}},
|
||||
"mysql-services": {&api.Service{}, &api.Service{}},
|
||||
@@ -602,6 +606,11 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
filesIgnore := map[string]map[string]bool{
|
||||
"../docs/tasks/debug-application-cluster": {
|
||||
"audit-policy": true,
|
||||
},
|
||||
}
|
||||
capabilities.SetForTests(capabilities.Capabilities{
|
||||
AllowPrivileged: true,
|
||||
})
|
||||
@@ -612,6 +621,12 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
err := walkConfigFiles(path, func(name, path string, docs [][]byte) {
|
||||
expectedTypes, found := expected[name]
|
||||
if !found {
|
||||
p := filepath.Dir(path)
|
||||
if files, ok := filesIgnore[p]; ok {
|
||||
if files[name] {
|
||||
return
|
||||
}
|
||||
}
|
||||
t.Errorf("%s: %s does not have a test case defined", path, name)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user