(t *testing.T)
| 544 | } |
| 545 | |
| 546 | func TestPackTwoIdenticalfiles(t *testing.T) { |
| 547 | const fileSize = 1 << 20 |
| 548 | fileContents := randBytes(fileSize) |
| 549 | testPack(t, |
| 550 | func(sto blobserver.Storage) (err error) { |
| 551 | if _, err = schema.WriteFileFromReader(ctxbg, sto, "a.txt", bytes.NewReader(fileContents)); err != nil { |
| 552 | return |
| 553 | } |
| 554 | if _, err = schema.WriteFileFromReader(ctxbg, sto, "b.txt", bytes.NewReader(fileContents)); err != nil { |
| 555 | return |
| 556 | } |
| 557 | return |
| 558 | }, |
| 559 | func(pt *packTest) { pt.sto.packGate = syncutil.NewGate(1) }, // one pack at a time |
| 560 | wantNumLargeBlobs(1), |
| 561 | wantNumSmallBlobs(1), // just the "b.txt" file schema blob |
| 562 | okayWithoutMeta("sha224-8cafef47a63c2bb4f5dd6edc656c606cab803460360989c38ee2dc57"), |
| 563 | ) |
| 564 | } |
| 565 | |
| 566 | // packTest is the state kept while running func testPack. |
| 567 | type packTest struct { |
nothing calls this directly
no test coverage detected