(ctx context.Context, t *testing.T, expectedID uuid.UUID, expectedB int, expectedCB int, rw *readerWriter)
| 241 | } |
| 242 | |
| 243 | func checkBlocklists(ctx context.Context, t *testing.T, expectedID uuid.UUID, expectedB int, expectedCB int, rw *readerWriter) { |
| 244 | rw.pollBlocklist(ctx) |
| 245 | |
| 246 | blocklist := rw.blocklist.Metas(testTenantID) |
| 247 | require.Len(t, blocklist, expectedB) |
| 248 | if expectedB > 0 && expectedID != uuid.Nil { |
| 249 | require.Equal(t, expectedID, (uuid.UUID)(blocklist[0].BlockID)) |
| 250 | } |
| 251 | |
| 252 | compactedBlocklist := rw.blocklist.CompactedMetas(testTenantID) |
| 253 | require.Len(t, compactedBlocklist, expectedCB) |
| 254 | if expectedCB > 0 && expectedID != uuid.Nil { |
| 255 | require.Equal(t, expectedID, (uuid.UUID)(compactedBlocklist[0].BlockID)) |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | func TestIncludeBlock(t *testing.T) { |
| 260 | tests := []struct { |
no test coverage detected