From 220a9d5f68ea6517c94597372471e56e1b81079b Mon Sep 17 00:00:00 2001 From: Alexander Davis Date: Fri, 14 Jun 2024 15:49:22 -0500 Subject: [PATCH] fix: wrong conditional on new metric test --- internal/pkg/handler/upgrade_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/pkg/handler/upgrade_test.go b/internal/pkg/handler/upgrade_test.go index ac521c36..8aad6cf1 100644 --- a/internal/pkg/handler/upgrade_test.go +++ b/internal/pkg/handler/upgrade_test.go @@ -1465,7 +1465,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNoTriggersUs t.Errorf("Counter was increased unexpectedly") } - if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 1 { + if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 0 { t.Errorf("Counter by namespace was increased unexpectedly") } } @@ -1508,7 +1508,7 @@ func TestRollingUpgradeForDeploymentWithConfigmapViaSearchAnnotationNotMappedUsi t.Errorf("Counter was increased unexpectedly") } - if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 1 { + if promtestutil.ToFloat64(collectors.Reloaded.With(prometheus.Labels{"success": "true", "namespace": arsNamespace})) > 0 { t.Errorf("Counter by namespace was increased unexpectedly") } }