From 99f31e4718dc76482d575fccbc07fae70fc1a149 Mon Sep 17 00:00:00 2001 From: Yoon Park Date: Wed, 12 Jul 2023 23:17:33 +0900 Subject: [PATCH] Use different metric name to pass static analysis Signed-off-by: Yoon Park --- pkg/scaling/scaledjob/metrics_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/scaling/scaledjob/metrics_test.go b/pkg/scaling/scaledjob/metrics_test.go index 634d96f0a36..502bde885e5 100644 --- a/pkg/scaling/scaledjob/metrics_test.go +++ b/pkg/scaling/scaledjob/metrics_test.go @@ -19,6 +19,8 @@ func TestTargetAverageValue(t *testing.T) { createMetricSpec(1, metricName), createMetricSpec(1, metricName), } + + metricName = "s1-messageCount" targetAverageValue = getTargetAverageValue(specs) assert.Equal(t, float64(1), targetAverageValue) // 5 5 3 -> 4.333333333333333 @@ -27,6 +29,8 @@ func TestTargetAverageValue(t *testing.T) { createMetricSpec(5, metricName), createMetricSpec(3, metricName), } + + metricName = "s2-messageCount" targetAverageValue = getTargetAverageValue(specs) assert.Equal(t, 4.333333333333333, targetAverageValue) @@ -36,6 +40,8 @@ func TestTargetAverageValue(t *testing.T) { createMetricSpec(5, metricName), createMetricSpec(4, metricName), } + + metricName = "s3-messageCount" targetAverageValue = getTargetAverageValue(specs) assert.Equal(t, 4.666666666666667, targetAverageValue) }