mirror of https://github.com/k3s-io/k3s
commit
dae5ac4828
|
@ -36,6 +36,14 @@ type ExtensionAPIObject struct {
|
||||||
func (obj *ExtensionAPIObject) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
func (obj *ExtensionAPIObject) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||||
|
|
||||||
func TestGetReference(t *testing.T) {
|
func TestGetReference(t *testing.T) {
|
||||||
|
|
||||||
|
// when vendoring kube, if you don't force the set of registered versions (like this hack/test-go.sh does)
|
||||||
|
// then you run into trouble because the types aren't registered in the scheme by anything. This does the
|
||||||
|
// register manually to allow unit test execution
|
||||||
|
if _, err := Scheme.ObjectKind(&Pod{}); err != nil {
|
||||||
|
AddToScheme(Scheme)
|
||||||
|
}
|
||||||
|
|
||||||
table := map[string]struct {
|
table := map[string]struct {
|
||||||
obj runtime.Object
|
obj runtime.Object
|
||||||
ref *ObjectReference
|
ref *ObjectReference
|
||||||
|
|
Loading…
Reference in New Issue