From b0a0335bafec21bcb25054eee84d05e16ec81d9b Mon Sep 17 00:00:00 2001 From: Chelsey Chen Date: Wed, 1 Jul 2020 15:33:20 -0400 Subject: [PATCH] Switch Event CRUD tests to use events.k8s.io/v1 --- test/e2e/instrumentation/BUILD | 4 ++-- test/e2e/instrumentation/events.go | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/e2e/instrumentation/BUILD b/test/e2e/instrumentation/BUILD index e9e3d346abd2b..96d8316f889c8 100644 --- a/test/e2e/instrumentation/BUILD +++ b/test/e2e/instrumentation/BUILD @@ -14,12 +14,12 @@ go_library( importpath = "k8s.io/kubernetes/test/e2e/instrumentation", deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/api/events/v1beta1:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1:go_default_library", "//test/e2e/framework:go_default_library", "//test/e2e/instrumentation/common:go_default_library", "//test/e2e/instrumentation/logging:go_default_library", diff --git a/test/e2e/instrumentation/events.go b/test/e2e/instrumentation/events.go index 227c2d5b52bec..34d8769be52a0 100644 --- a/test/e2e/instrumentation/events.go +++ b/test/e2e/instrumentation/events.go @@ -23,11 +23,11 @@ import ( "time" "k8s.io/api/core/v1" - eventsv1beta1 "k8s.io/api/events/v1beta1" + eventsv1 "k8s.io/api/events/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" - typedeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" + typedeventsv1 "k8s.io/client-go/kubernetes/typed/events/v1" "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/instrumentation/common" @@ -35,9 +35,9 @@ import ( "k8s.io/apimachinery/pkg/types" ) -func newTestEvent(namespace, name, label string) *eventsv1beta1.Event { +func newTestEvent(namespace, name, label string) *eventsv1.Event { someTime := metav1.MicroTime{Time: time.Unix(1505828956, 0)} - return &eventsv1beta1.Event{ + return &eventsv1.Event{ ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ @@ -57,7 +57,7 @@ func newTestEvent(namespace, name, label string) *eventsv1beta1.Event { } } -func eventExistsInList(client typedeventsv1beta1.EventInterface, namespace, name string) bool { +func eventExistsInList(client typedeventsv1.EventInterface, namespace, name string) bool { eventsList, err := client.List(context.TODO(), metav1.ListOptions{ LabelSelector: "testevent-constant=true", }) @@ -73,12 +73,12 @@ func eventExistsInList(client typedeventsv1beta1.EventInterface, namespace, name var _ = common.SIGDescribe("Events API", func() { f := framework.NewDefaultFramework("events") - var client typedeventsv1beta1.EventInterface - var clientAllNamespaces typedeventsv1beta1.EventInterface + var client typedeventsv1.EventInterface + var clientAllNamespaces typedeventsv1.EventInterface ginkgo.BeforeEach(func() { - client = f.ClientSet.EventsV1beta1().Events(f.Namespace.Name) - clientAllNamespaces = f.ClientSet.EventsV1beta1().Events(metav1.NamespaceAll) + client = f.ClientSet.EventsV1().Events(f.Namespace.Name) + clientAllNamespaces = f.ClientSet.EventsV1().Events(metav1.NamespaceAll) }) /*