Update examples/glusterfs to v1beta3;

Add desciption of Glusterfs endpoints in README.md;
Add validation for endpoints in examples_test.go
This commit is contained in:
Chao Xu
2015-05-14 11:59:34 -07:00
parent 6c3365c418
commit b5439d4486
5 changed files with 90 additions and 27 deletions

View File

@@ -74,6 +74,11 @@ func validateObject(obj runtime.Object) (errors []error) {
t.Namespace = api.NamespaceDefault
}
errors = validation.ValidatePodTemplate(t)
case *api.Endpoints:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
}
errors = validation.ValidateEndpoints(t)
default:
return []error{fmt.Errorf("no validation defined for %#v", obj)}
}
@@ -161,8 +166,9 @@ func TestExampleObjectSchemas(t *testing.T) {
"../examples/iscsi": {
"iscsi": &api.Pod{},
},
"../examples/glusterfs/v1beta3": {
"glusterfs": &api.Pod{},
"../examples/glusterfs": {
"glusterfs-pod": &api.Pod{},
"glusterfs-endpoints": &api.Endpoints{},
},
"../examples": {
"pod": &api.Pod{},