chore: update linter
This commit is contained in:
parent
12e50e20e6
commit
553ef94047
46 changed files with 129 additions and 105 deletions
|
@ -18,6 +18,8 @@ import (
|
|||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
const delta float64 = 1e-10
|
||||
|
||||
func TestNewRateLimiter(t *testing.T) {
|
||||
testCases := []struct {
|
||||
desc string
|
||||
|
@ -131,7 +133,7 @@ func TestNewRateLimiter(t *testing.T) {
|
|||
assert.Equal(t, test.requestHeader, hd)
|
||||
}
|
||||
if test.expectedRTL != 0 {
|
||||
assert.Equal(t, test.expectedRTL, rtl.rate)
|
||||
assert.InDelta(t, float64(test.expectedRTL), float64(rtl.rate), delta)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue