From 47f579c5eeca1726ef4f160d2c71c3edf51db758 Mon Sep 17 00:00:00 2001 From: Chetan Banavikalmutt Date: Sat, 30 Mar 2024 00:29:50 +0530 Subject: [PATCH] chore: fix lint errors reported by golangci-lint (#3458) fix: lint errors reported by golangci-lint Signed-off-by: Chetan Banavikalmutt --- controller/metrics/prommetrics.go | 2 +- rollout/canary_test.go | 3 --- rollout/service_test.go | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/controller/metrics/prommetrics.go b/controller/metrics/prommetrics.go index 3e55ba1ccb..c0d3b89f62 100644 --- a/controller/metrics/prommetrics.go +++ b/controller/metrics/prommetrics.go @@ -135,7 +135,7 @@ var ( MetricAnalysisTemplateInfo = prometheus.NewDesc( "analysis_template_info", "Information about analysis templates.", - append(namespaceNameLabels), + namespaceNameLabels, nil, ) diff --git a/rollout/canary_test.go b/rollout/canary_test.go index 0d2065a8db..56b05c7177 100644 --- a/rollout/canary_test.go +++ b/rollout/canary_test.go @@ -957,7 +957,6 @@ func TestRollBackToActiveReplicaSetWithinWindow(t *testing.T) { f.kubeobjects = append(f.kubeobjects, rs1, rs2) f.replicaSetLister = append(f.replicaSetLister, rs1, rs2) - f.serviceLister = append(f.serviceLister) // Switch back to version 1 r2.Spec.Template = r1.Spec.Template @@ -1658,8 +1657,6 @@ func TestCanaryRolloutWithInvalidPingServiceName(t *testing.T) { f.rolloutLister = append(f.rolloutLister, r) f.objects = append(f.objects, r) - f.kubeobjects = append(f.kubeobjects) - f.serviceLister = append(f.serviceLister) patchIndex := f.expectPatchRolloutAction(r) f.run(getKey(r, t)) diff --git a/rollout/service_test.go b/rollout/service_test.go index cb15367a3a..0466634bde 100644 --- a/rollout/service_test.go +++ b/rollout/service_test.go @@ -158,7 +158,6 @@ func TestPreviewServiceNotFound(t *testing.T) { activeSvc := newService("active-svc", 80, nil, nil) notUsedPreviewSvc := newService("preview-svc", 80, nil, nil) f.kubeobjects = append(f.kubeobjects, activeSvc) - f.serviceLister = append(f.serviceLister) patchIndex := f.expectPatchRolloutAction(r) f.run(getKey(r, t))