11/*
2- Copyright 2018 The Kubernetes Authors.
2+ Copyright 2018 The Kubernetes Authors.
33
4- Licensed under the Apache License, Version 2.0 (the "License");
5- you may not use this file except in compliance with the License.
6- You may obtain a copy of the License at
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
77
8- http://www.apache.org/licenses/LICENSE-2.0
8+ http://www.apache.org/licenses/LICENSE-2.0
99
10- Unless required by applicable law or agreed to in writing, software
11- distributed under the License is distributed on an "AS IS" BASIS,
12- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- See the License for the specific language governing permissions and
14- limitations under the License.
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
1515*/
1616
1717package handler_test
@@ -27,6 +27,7 @@ import (
2727 "k8s.io/apimachinery/pkg/types"
2828 "k8s.io/client-go/kubernetes/scheme"
2929 "k8s.io/client-go/util/workqueue"
30+ "sigs.k8s.io/controller-runtime/pkg/client"
3031 "sigs.k8s.io/controller-runtime/pkg/client/apiutil"
3132 "sigs.k8s.io/controller-runtime/pkg/controller/controllertest"
3233 "sigs.k8s.io/controller-runtime/pkg/event"
@@ -191,9 +192,9 @@ var _ = Describe("Eventhandler", func() {
191192 Describe ("EnqueueRequestsFromMapFunc" , func () {
192193 It ("should enqueue a Request with the function applied to the CreateEvent." , func () {
193194 req := []reconcile.Request {}
194- instance := handler .EnqueueRequestsFromMapFunc (func (a handler. MapObject ) []reconcile.Request {
195+ instance := handler .EnqueueRequestsFromMapFunc (func (a client. Object ) []reconcile.Request {
195196 defer GinkgoRecover ()
196- Expect (a . Object ).To (Equal (pod ))
197+ Expect (a ).To (Equal (pod ))
197198 req = []reconcile.Request {
198199 {
199200 NamespacedName : types.NamespacedName {Namespace : "foo" , Name : "bar" },
@@ -222,9 +223,9 @@ var _ = Describe("Eventhandler", func() {
222223
223224 It ("should enqueue a Request with the function applied to the DeleteEvent." , func () {
224225 req := []reconcile.Request {}
225- instance := handler .EnqueueRequestsFromMapFunc (func (a handler. MapObject ) []reconcile.Request {
226+ instance := handler .EnqueueRequestsFromMapFunc (func (a client. Object ) []reconcile.Request {
226227 defer GinkgoRecover ()
227- Expect (a . Object ).To (Equal (pod ))
228+ Expect (a ).To (Equal (pod ))
228229 req = []reconcile.Request {
229230 {
230231 NamespacedName : types.NamespacedName {Namespace : "foo" , Name : "bar" },
@@ -259,14 +260,14 @@ var _ = Describe("Eventhandler", func() {
259260
260261 req := []reconcile.Request {}
261262
262- instance := handler .EnqueueRequestsFromMapFunc (func (a handler. MapObject ) []reconcile.Request {
263+ instance := handler .EnqueueRequestsFromMapFunc (func (a client. Object ) []reconcile.Request {
263264 defer GinkgoRecover ()
264265 req = []reconcile.Request {
265266 {
266- NamespacedName : types.NamespacedName {Namespace : "foo" , Name : a .Object . GetName () + "-bar" },
267+ NamespacedName : types.NamespacedName {Namespace : "foo" , Name : a .GetName () + "-bar" },
267268 },
268269 {
269- NamespacedName : types.NamespacedName {Namespace : "biz" , Name : a .Object . GetName () + "-baz" },
270+ NamespacedName : types.NamespacedName {Namespace : "biz" , Name : a .GetName () + "-baz" },
270271 },
271272 }
272273 return req
@@ -298,9 +299,9 @@ var _ = Describe("Eventhandler", func() {
298299
299300 It ("should enqueue a Request with the function applied to the GenericEvent." , func () {
300301 req := []reconcile.Request {}
301- instance := handler .EnqueueRequestsFromMapFunc (func (a handler. MapObject ) []reconcile.Request {
302+ instance := handler .EnqueueRequestsFromMapFunc (func (a client. Object ) []reconcile.Request {
302303 defer GinkgoRecover ()
303- Expect (a . Object ).To (Equal (pod ))
304+ Expect (a ).To (Equal (pod ))
304305 req = []reconcile.Request {
305306 {
306307 NamespacedName : types.NamespacedName {Namespace : "foo" , Name : "bar" },
0 commit comments