Pull request: all: rm var shadowing, vol. 2

Updates #2803.

Squashed commit of the following:

commit bf7186378164f19ea9e21ec832526792efa2f9c3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Mar 11 19:48:17 2021 +0300

    all: rm var shadowing, vol. 2
This commit is contained in:
Ainar Garipov
2021-03-11 20:36:54 +03:00
parent dfdbfee4fd
commit 4cf44dd1d4
7 changed files with 31 additions and 20 deletions

View File

@@ -112,11 +112,11 @@ func TestQLogReader_Seek(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
timestamp, err := time.Parse(time.RFC3339Nano, tc.time)
ts, err := time.Parse(time.RFC3339Nano, tc.time)
require.Nil(t, err)
err = r.SeekTS(timestamp.UnixNano())
assert.True(t, errors.Is(err, tc.want))
err = r.SeekTS(ts.UnixNano())
assert.True(t, errors.Is(err, tc.want), err)
})
}
}
@@ -146,7 +146,7 @@ func TestQLogReader_ReadNext(t *testing.T) {
require.Nil(t, err)
for i := 1; i < tc.start; i++ {
_, err := r.ReadNext()
_, err = r.ReadNext()
require.Nil(t, err)
}