(t *testing.T)
| 209 | } |
| 210 | |
| 211 | func TestPoolSliceReaderErrorPropagation(t *testing.T) { |
| 212 | ctx := log.Testing(t) |
| 213 | ctx = database.Put(ctx, database.NewInMemory(ctx)) |
| 214 | p := Pool{} |
| 215 | p.Write(2, Resource(id.ID{}, 5)) |
| 216 | |
| 217 | got, err := readFully(p.Slice(Range{Base: 0, Size: 10}).NewReader(ctx), 512) |
| 218 | assert.For(ctx, "len").That(len(got)).Equals(2) |
| 219 | assert.For(ctx, "err").ThatError(err).Failed() |
| 220 | } |
| 221 | |
| 222 | // Write layout: |
| 223 | // innerPool: |