mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Tests that check metav1
This commit is contained in:
parent
f623a8c908
commit
c12344b3b8
@ -19,7 +19,6 @@ package testgroup
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
)
|
||||
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: "testgroup.k8s.io", Version: runtime.APIVersionInternal}
|
||||
|
@ -180,6 +180,8 @@ var nonRoundTrippableTypes = sets.NewString(
|
||||
// the schema by content type, rather than via kind/version included in each
|
||||
// object.
|
||||
"WatchEvent",
|
||||
// ListOptions is now part of the meta group
|
||||
"ListOptions",
|
||||
)
|
||||
|
||||
var commonKinds = []string{"Status", "ListOptions", "DeleteOptions", "ExportOptions"}
|
||||
|
@ -81,6 +81,7 @@ var typesAllowedTags = map[reflect.Type]bool{
|
||||
reflect.TypeOf(metav1.LabelSelector{}): true,
|
||||
reflect.TypeOf(metav1.GetOptions{}): 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) {
|
||||
|
@ -28,7 +28,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/testapi"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
)
|
||||
|
||||
@ -211,7 +210,7 @@ func TestCreater(t *testing.T) {
|
||||
{
|
||||
name: "valid ListOptions creation",
|
||||
kind: schema.GroupVersionKind{Version: "v1", Kind: "ListOptions"},
|
||||
expectedObj: &v1.ListOptions{},
|
||||
expectedObj: &metav1.ListOptions{},
|
||||
expectErr: false,
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user