(t *testing.T)
| 30 | } |
| 31 | |
| 32 | func TestValidateFailsOnMissingBloom(t *testing.T) { |
| 33 | ctx := context.Background() |
| 34 | block, w := validBlock(t) |
| 35 | meta := block.meta |
| 36 | |
| 37 | err := block.Validate(ctx) |
| 38 | require.NoError(t, err) |
| 39 | |
| 40 | // remove a bloom |
| 41 | err = w.Delete(ctx, common.BloomName(0), backend.KeyPathForBlock(uuid.UUID(meta.BlockID), meta.TenantID)) |
| 42 | require.NoError(t, err) |
| 43 | |
| 44 | err = block.Validate(ctx) |
| 45 | require.Error(t, err) |
| 46 | } |
| 47 | |
| 48 | func validBlock(t *testing.T) (*backendBlock, backend.Writer) { |
| 49 | t.Helper() |
nothing calls this directly
no test coverage detected