massive changes
This commit is contained in:
parent
9031da0acd
commit
a150acbc74
|
@ -365,7 +365,7 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||||
}
|
}
|
||||||
//TODO: Add validate method for &schedulerapi.Policy
|
//TODO: Add validate method for &schedulerapi.Policy
|
||||||
} else {
|
} else {
|
||||||
if err := latest.Codec.DecodeInto(data, expectedType); err != nil {
|
if err := latest.GroupOrDie("").Codec.DecodeInto(data, expectedType); err != nil {
|
||||||
t.Errorf("%s did not decode correctly: %v\n%s", path, err, string(data))
|
t.Errorf("%s did not decode correctly: %v\n%s", path, err, string(data))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -451,14 +451,14 @@ func TestReadme(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("%s could not be converted to JSON: %v\n%s", path, err, string(content))
|
t.Errorf("%s could not be converted to JSON: %v\n%s", path, err, string(content))
|
||||||
}
|
}
|
||||||
if err := latest.Codec.DecodeInto(json, expectedType); err != nil {
|
if err := latest.GroupOrDie("").Codec.DecodeInto(json, expectedType); err != nil {
|
||||||
t.Errorf("%s did not decode correctly: %v\n%s", path, err, string(content))
|
t.Errorf("%s did not decode correctly: %v\n%s", path, err, string(content))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if errors := validateObject(expectedType); len(errors) > 0 {
|
if errors := validateObject(expectedType); len(errors) > 0 {
|
||||||
t.Errorf("%s did not validate correctly: %v", path, errors)
|
t.Errorf("%s did not validate correctly: %v", path, errors)
|
||||||
}
|
}
|
||||||
_, err = latest.Codec.Encode(expectedType)
|
_, err = latest.GroupOrDie("").Codec.Encode(expectedType)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Could not encode object: %v", err)
|
t.Errorf("Could not encode object: %v", err)
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -62,5 +62,5 @@ func main() {
|
||||||
"nginx.key": nginxKey,
|
"nginx.key": nginxKey,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
fmt.Printf(runtime.EncodeOrDie(latest.Codec, secret))
|
fmt.Printf(runtime.EncodeOrDie(latest.GroupOrDie("").Codec, secret))
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,5 +59,5 @@ func main() {
|
||||||
"config": cfg,
|
"config": cfg,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
fmt.Printf(runtime.EncodeOrDie(latest.Codec, secret))
|
fmt.Printf(runtime.EncodeOrDie(latest.GroupOrDie("").Codec, secret))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue