Pull request 2195: upd-go-code

Squashed commit of the following:

commit a1bd3c249be043108c84a902d2e88bf80946d444
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Apr 4 14:59:37 2024 +0300

    all: upd more

commit 9e55bbb02c2af2064aa2a2ca7b49fd28b544a02c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Apr 4 14:12:45 2024 +0300

    all: upd go code
This commit is contained in:
Ainar Garipov
2024-04-04 15:52:39 +03:00
parent 0e1e568899
commit ee619b2dbd
34 changed files with 64 additions and 111 deletions

View File

@@ -143,13 +143,13 @@ func TestQueryLogOffsetLimit(t *testing.T) {
secondPageDomain = "second.example.org"
)
// Add entries to the log.
for i := 0; i < entNum; i++ {
for range entNum {
addEntry(l, secondPageDomain, net.IPv4(1, 1, 1, 1), net.IPv4(2, 2, 2, 1))
}
// Write them to the first file.
require.NoError(t, l.flushLogBuffer())
// Add more to the in-memory part of log.
for i := 0; i < entNum; i++ {
for range entNum {
addEntry(l, firstPageDomain, net.IPv4(1, 1, 1, 1), net.IPv4(2, 2, 2, 1))
}
@@ -215,7 +215,7 @@ func TestQueryLogMaxFileScanEntries(t *testing.T) {
const entNum = 10
// Add entries to the log.
for i := 0; i < entNum; i++ {
for range entNum {
addEntry(l, "example.org", net.IPv4(1, 1, 1, 1), net.IPv4(2, 2, 2, 1))
}
// Write them to disk.