From 48fd7b82fe0ca7a30c6ee41ef994bae18243c0a9 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Mon, 30 Oct 2023 13:29:59 +0200 Subject: [PATCH] controllers: use const appLabel in tests Signed-off-by: Mikko Ylinen --- pkg/controllers/dlb/controller_test.go | 2 +- pkg/controllers/dsa/controller_test.go | 2 +- pkg/controllers/fpga/controller_test.go | 2 +- pkg/controllers/gpu/controller_test.go | 2 +- pkg/controllers/qat/controller_test.go | 2 +- pkg/controllers/sgx/controller_test.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/controllers/dlb/controller_test.go b/pkg/controllers/dlb/controller_test.go index a93ac487..f0573220 100644 --- a/pkg/controllers/dlb/controller_test.go +++ b/pkg/controllers/dlb/controller_test.go @@ -42,7 +42,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-dlb-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, }, diff --git a/pkg/controllers/dsa/controller_test.go b/pkg/controllers/dsa/controller_test.go index d1de04de..c168093d 100644 --- a/pkg/controllers/dsa/controller_test.go +++ b/pkg/controllers/dsa/controller_test.go @@ -43,7 +43,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-dsa-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, }, diff --git a/pkg/controllers/fpga/controller_test.go b/pkg/controllers/fpga/controller_test.go index 806a2cef..76e974f0 100644 --- a/pkg/controllers/fpga/controller_test.go +++ b/pkg/controllers/fpga/controller_test.go @@ -45,7 +45,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-fpga-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, }, diff --git a/pkg/controllers/gpu/controller_test.go b/pkg/controllers/gpu/controller_test.go index 94b28b9c..c0b8b824 100644 --- a/pkg/controllers/gpu/controller_test.go +++ b/pkg/controllers/gpu/controller_test.go @@ -45,7 +45,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-gpu-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, }, diff --git a/pkg/controllers/qat/controller_test.go b/pkg/controllers/qat/controller_test.go index 83c3e90c..c2eb12be 100644 --- a/pkg/controllers/qat/controller_test.go +++ b/pkg/controllers/qat/controller_test.go @@ -45,7 +45,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-qat-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, }, diff --git a/pkg/controllers/sgx/controller_test.go b/pkg/controllers/sgx/controller_test.go index f4a7b20d..2281d78d 100644 --- a/pkg/controllers/sgx/controller_test.go +++ b/pkg/controllers/sgx/controller_test.go @@ -45,7 +45,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-sgx-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, },