From 93c08329424d4e0a123d6ae32aa6bad9d70f85be Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Fri, 27 Sep 2024 20:58:52 +0200 Subject: [PATCH] [chore]: enable negative-positive rules from testifylint Signed-off-by: Matthieu MOREL --- .golangci.yml | 1 - sdk/metric/internal/aggregate/exponential_histogram_test.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index f971865bbf48..d09555506f7e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -308,5 +308,4 @@ linters-settings: disable: - float-compare - go-require - - negative-positive - require-error diff --git a/sdk/metric/internal/aggregate/exponential_histogram_test.go b/sdk/metric/internal/aggregate/exponential_histogram_test.go index f3ef2434632c..9ede71ac88c3 100644 --- a/sdk/metric/internal/aggregate/exponential_histogram_test.go +++ b/sdk/metric/internal/aggregate/exponential_histogram_test.go @@ -180,7 +180,7 @@ func testExpoHistogramMinMaxSumInt64(t *testing.T) { assert.Equal(t, tt.expected.max, dp.max) assert.Equal(t, tt.expected.min, dp.min) - assert.Equal(t, tt.expected.sum, dp.sum) + assert.InDelta(t, tt.expected.sum, dp.sum, 0.01) }) } } @@ -222,7 +222,7 @@ func testExpoHistogramMinMaxSumFloat64(t *testing.T) { assert.Equal(t, tt.expected.max, dp.max) assert.Equal(t, tt.expected.min, dp.min) - assert.Equal(t, tt.expected.sum, dp.sum) + assert.InDelta(t, tt.expected.sum, dp.sum, 0.01) }) } }