From d34d4e4cec44a0db0fdb4eb3fc4b19231e6196c7 Mon Sep 17 00:00:00 2001 From: Neo2308 Date: Mon, 21 Oct 2024 21:50:01 +0530 Subject: [PATCH] Fixing tests Signed-off-by: Neo2308 --- internal/ansible/handler/logging_enqueue_annotation_test.go | 4 ++-- internal/ansible/handler/logging_enqueue_object_test.go | 4 ++-- internal/ansible/handler/logging_enqueue_owner_test.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/ansible/handler/logging_enqueue_annotation_test.go b/internal/ansible/handler/logging_enqueue_annotation_test.go index e73f801..6bce49a 100644 --- a/internal/ansible/handler/logging_enqueue_annotation_test.go +++ b/internal/ansible/handler/logging_enqueue_annotation_test.go @@ -34,7 +34,7 @@ import ( ) var _ = Describe("LoggingEnqueueRequestForAnnotation", func() { - var q workqueue.RateLimitingInterface + var q workqueue.TypedRateLimitingInterface[reconcile.Request] var instance LoggingEnqueueRequestForAnnotation var pod *corev1.Pod var podOwner *corev1.Pod @@ -42,7 +42,7 @@ var _ = Describe("LoggingEnqueueRequestForAnnotation", func() { BeforeEach(func() { ctx = context.TODO() - q = &controllertest.Queue{Interface: workqueue.New()} + q = &controllertest.TypedQueue[reconcile.Request]{TypedInterface: workqueue.NewTyped[reconcile.Request]()} pod = &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Namespace: "biz", diff --git a/internal/ansible/handler/logging_enqueue_object_test.go b/internal/ansible/handler/logging_enqueue_object_test.go index 1544b9d..1ffdf31 100644 --- a/internal/ansible/handler/logging_enqueue_object_test.go +++ b/internal/ansible/handler/logging_enqueue_object_test.go @@ -32,14 +32,14 @@ import ( ) var _ = Describe("LoggingEnqueueRequestForObject", func() { - var q workqueue.RateLimitingInterface + var q workqueue.TypedRateLimitingInterface[reconcile.Request] var instance LoggingEnqueueRequestForObject var pod *corev1.Pod var ctx = context.TODO() BeforeEach(func() { logBuffer.Reset() - q = &controllertest.Queue{Interface: workqueue.New()} + q = &controllertest.TypedQueue[reconcile.Request]{TypedInterface: workqueue.NewTyped[reconcile.Request]()} instance = LoggingEnqueueRequestForObject{} pod = &corev1.Pod{ TypeMeta: metav1.TypeMeta{ diff --git a/internal/ansible/handler/logging_enqueue_owner_test.go b/internal/ansible/handler/logging_enqueue_owner_test.go index 026f729..865774a 100644 --- a/internal/ansible/handler/logging_enqueue_owner_test.go +++ b/internal/ansible/handler/logging_enqueue_owner_test.go @@ -38,11 +38,11 @@ import ( var _ = Describe("Eventhandler", func() { var ctx = context.Background() - var q workqueue.RateLimitingInterface + var q workqueue.TypedRateLimitingInterface[reconcile.Request] var pod *corev1.Pod var mapper meta.RESTMapper BeforeEach(func() { - q = &controllertest.Queue{Interface: workqueue.New()} + q = &controllertest.TypedQueue[reconcile.Request]{TypedInterface: workqueue.NewTyped[reconcile.Request]()} pod = &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{Namespace: "biz", Name: "baz"}, }