Pull request: querylog: fix logic

Merge in DNS/adguard-home from fix-querylog-logs to master

Squashed commit of the following:

commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd
Merge: d1981696 a3968658
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Dec 13 13:48:25 2021 +0300

    Merge branch 'master' into fix-querylog-logs

commit d1981696782ca9adc5213f76cdbe2dc9f859f921
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Dec 10 21:14:04 2021 +0300

    querylog: fix logic
This commit is contained in:
Ainar Garipov
2021-12-13 13:55:41 +03:00
parent a396865869
commit 0bd436f4b0
6 changed files with 40 additions and 29 deletions

View File

@@ -97,7 +97,7 @@ func TestQLogReader_Seek(t *testing.T) {
}, {
name: "non-existent_long_ago",
time: "2000-02-19T01:23:16.920973+03:00",
want: ErrTSTooEarly,
want: ErrTSNotFound,
}, {
name: "non-existent_far_ahead",
time: "2100-02-19T01:23:16.920973+03:00",
@@ -113,7 +113,7 @@ func TestQLogReader_Seek(t *testing.T) {
ts, err := time.Parse(time.RFC3339Nano, tc.time)
require.NoError(t, err)
err = r.SeekTS(ts.UnixNano())
err = r.seekTS(ts.UnixNano())
assert.ErrorIs(t, err, tc.want)
})
}