Tests that check metav1

This commit is contained in:
Clayton Coleman 2017-01-21 18:28:51 -05:00
parent f623a8c908
commit c12344b3b8
No known key found for this signature in database
GPG Key ID: 3D16906B4F1C5CB3
4 changed files with 4 additions and 3 deletions

View File

@ -19,7 +19,6 @@ package testgroup
import ( import (
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/api"
) )
var SchemeGroupVersion = schema.GroupVersion{Group: "testgroup.k8s.io", Version: runtime.APIVersionInternal} var SchemeGroupVersion = schema.GroupVersion{Group: "testgroup.k8s.io", Version: runtime.APIVersionInternal}

View File

@ -180,6 +180,8 @@ var nonRoundTrippableTypes = sets.NewString(
// the schema by content type, rather than via kind/version included in each // the schema by content type, rather than via kind/version included in each
// object. // object.
"WatchEvent", "WatchEvent",
// ListOptions is now part of the meta group
"ListOptions",
) )
var commonKinds = []string{"Status", "ListOptions", "DeleteOptions", "ExportOptions"} var commonKinds = []string{"Status", "ListOptions", "DeleteOptions", "ExportOptions"}

View File

@ -81,6 +81,7 @@ var typesAllowedTags = map[reflect.Type]bool{
reflect.TypeOf(metav1.LabelSelector{}): true, reflect.TypeOf(metav1.LabelSelector{}): true,
reflect.TypeOf(metav1.GetOptions{}): true, reflect.TypeOf(metav1.GetOptions{}): true,
reflect.TypeOf(metav1.ExportOptions{}): true, reflect.TypeOf(metav1.ExportOptions{}): true,
reflect.TypeOf(metav1.ListOptions{}): true,
} }
func ensureNoTags(t *testing.T, gvk schema.GroupVersionKind, tp reflect.Type, parents []reflect.Type) { func ensureNoTags(t *testing.T, gvk schema.GroupVersionKind, tp reflect.Type, parents []reflect.Type) {

View File

@ -28,7 +28,6 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions"
) )
@ -211,7 +210,7 @@ func TestCreater(t *testing.T) {
{ {
name: "valid ListOptions creation", name: "valid ListOptions creation",
kind: schema.GroupVersionKind{Version: "v1", Kind: "ListOptions"}, kind: schema.GroupVersionKind{Version: "v1", Kind: "ListOptions"},
expectedObj: &v1.ListOptions{}, expectedObj: &metav1.ListOptions{},
expectErr: false, expectErr: false,
}, },
} }