Skip to content

Commit 469f3d7

Browse files
authored
[chore]: enable negative-positive rule from testifylint (#5849)
Testifylint is a linter that provides best practices with the use of testify. This PR enables [negative-positive](https://github.com/Antonboom/testifylint?tab=readme-ov-file#negative-positive) rule from [testifylint](https://github.com/Antonboom/testifylint) Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 481f498 commit 469f3d7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,5 +308,4 @@ linters-settings:
308308
disable:
309309
- float-compare
310310
- go-require
311-
- negative-positive
312311
- require-error

sdk/metric/internal/aggregate/exponential_histogram_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func testExpoHistogramMinMaxSumInt64(t *testing.T) {
180180

181181
assert.Equal(t, tt.expected.max, dp.max)
182182
assert.Equal(t, tt.expected.min, dp.min)
183-
assert.Equal(t, tt.expected.sum, dp.sum)
183+
assert.InDelta(t, tt.expected.sum, dp.sum, 0.01)
184184
})
185185
}
186186
}
@@ -222,7 +222,7 @@ func testExpoHistogramMinMaxSumFloat64(t *testing.T) {
222222

223223
assert.Equal(t, tt.expected.max, dp.max)
224224
assert.Equal(t, tt.expected.min, dp.min)
225-
assert.Equal(t, tt.expected.sum, dp.sum)
225+
assert.InDelta(t, tt.expected.sum, dp.sum, 0.01)
226226
})
227227
}
228228
}

0 commit comments

Comments
 (0)