AssertInvalidOffsetLength verifies that the given combination of (offset,length) fails on GetBlob().
(ctx context.Context, t *testing.T, s blob.Storage, blobID blob.ID, offset, length int64)
| 90 | |
| 91 | // AssertInvalidOffsetLength verifies that the given combination of (offset,length) fails on GetBlob(). |
| 92 | func AssertInvalidOffsetLength(ctx context.Context, t *testing.T, s blob.Storage, blobID blob.ID, offset, length int64) { |
| 93 | t.Helper() |
| 94 | |
| 95 | var tmp gather.WriteBuffer |
| 96 | defer tmp.Close() |
| 97 | |
| 98 | if err := s.GetBlob(ctx, blobID, offset, length, &tmp); err == nil { |
| 99 | t.Fatalf("GetBlob(%v,%v,%v) did not return error for invalid offset/length", blobID, offset, length) |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | // AssertGetBlobNotFound asserts that GetBlob() for specified blobID returns ErrNotFound. |
| 104 | func AssertGetBlobNotFound(ctx context.Context, t *testing.T, s blob.Storage, blobID blob.ID) { |
no test coverage detected