lib/logstorage: make golangci-lint happy

This commit is contained in:
Aliaksandr Valialkin 2024-06-25 03:04:21 +02:00
parent 6a0cf2cd29
commit 7252c5d258
No known key found for this signature in database
GPG Key ID: 52C003EE2BCDB9EB

View File

@ -724,7 +724,7 @@ func TestStorageSearch(t *testing.T) {
} }
} }
t.Run("missing-tenant-smaller-than-existing", func(t *testing.T) { t.Run("missing-tenant-smaller-than-existing", func(_ *testing.T) {
tenantID := TenantID{ tenantID := TenantID{
AccountID: 0, AccountID: 0,
ProjectID: 0, ProjectID: 0,
@ -742,7 +742,7 @@ func TestStorageSearch(t *testing.T) {
} }
s.search(workersCount, so, nil, processBlock) s.search(workersCount, so, nil, processBlock)
}) })
t.Run("missing-tenant-bigger-than-existing", func(t *testing.T) { t.Run("missing-tenant-bigger-than-existing", func(_ *testing.T) {
tenantID := TenantID{ tenantID := TenantID{
AccountID: tenantsCount + 1, AccountID: tenantsCount + 1,
ProjectID: 0, ProjectID: 0,
@ -760,7 +760,7 @@ func TestStorageSearch(t *testing.T) {
} }
s.search(workersCount, so, nil, processBlock) s.search(workersCount, so, nil, processBlock)
}) })
t.Run("missing-tenant-middle", func(t *testing.T) { t.Run("missing-tenant-middle", func(_ *testing.T) {
tenantID := TenantID{ tenantID := TenantID{
AccountID: 1, AccountID: 1,
ProjectID: 0, ProjectID: 0,
@ -824,7 +824,7 @@ func TestStorageSearch(t *testing.T) {
t.Fatalf("unexpected number of matching rows; got %d; want %d", n, expectedRowsCount) t.Fatalf("unexpected number of matching rows; got %d; want %d", n, expectedRowsCount)
} }
}) })
t.Run("stream-filter-mismatch", func(t *testing.T) { t.Run("stream-filter-mismatch", func(_ *testing.T) {
sf := mustNewTestStreamFilter(`{job="foobar",instance=~"host-.+:2345"}`) sf := mustNewTestStreamFilter(`{job="foobar",instance=~"host-.+:2345"}`)
minTimestamp := baseTimestamp minTimestamp := baseTimestamp
maxTimestamp := baseTimestamp + rowsPerBlock*1e9 + blocksPerStream maxTimestamp := baseTimestamp + rowsPerBlock*1e9 + blocksPerStream
@ -950,7 +950,7 @@ func TestStorageSearch(t *testing.T) {
t.Fatalf("unexpected number of rows; got %d; want %d", n, expectedRowsCount) t.Fatalf("unexpected number of rows; got %d; want %d", n, expectedRowsCount)
} }
}) })
t.Run("matching-stream-id-missing-time-range", func(t *testing.T) { t.Run("matching-stream-id-missing-time-range", func(_ *testing.T) {
sf := mustNewTestStreamFilter(`{job="foobar",instance="host-1:234"}`) sf := mustNewTestStreamFilter(`{job="foobar",instance="host-1:234"}`)
tenantID := TenantID{ tenantID := TenantID{
AccountID: 1, AccountID: 1,