fix fixture for #17922
This commit is contained in:
@@ -153,12 +153,8 @@ func NewObjects(scheme ObjectScheme, decoder runtime.Decoder) ObjectRetriever {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o objects) Kind(kind unversioned.GroupVersionKind, name string) (runtime.Object, error) {
|
func (o objects) Kind(kind unversioned.GroupVersionKind, name string) (runtime.Object, error) {
|
||||||
// TODO our test clients deal in internal versions. We need to plumb that knowledge down here
|
kind.Version = runtime.APIVersionInternal
|
||||||
// we might do this via an extra function to the scheme to allow getting internal group versions
|
empty, err := o.scheme.New(kind)
|
||||||
// I'm punting for now
|
|
||||||
kind.Version = ""
|
|
||||||
|
|
||||||
empty, _ := o.scheme.New(kind)
|
|
||||||
nilValue := reflect.Zero(reflect.TypeOf(empty)).Interface().(runtime.Object)
|
nilValue := reflect.Zero(reflect.TypeOf(empty)).Interface().(runtime.Object)
|
||||||
|
|
||||||
arr, ok := o.types[kind.Kind]
|
arr, ok := o.types[kind.Kind]
|
||||||
|
Reference in New Issue
Block a user