mirror of
https://github.com/containerd/containerd.git
synced 2026-11-06 05:17:02 +00:00
content/testsuite: specify blob sizes in WriteBlob tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
1 file changed
+2
-2
@@ -320,7 +320,7 @@ func checkResumeWriter(ctx context.Context, t *testing.T, cs content.Store) {
|
||||
|
||||
func checkCommitExists(ctx context.Context, t *testing.T, cs content.Store) {
|
||||
c1, d1 := createContent(256)
|
||||
if err := content.WriteBlob(ctx, cs, "c1", bytes.NewReader(c1), ocispec.Descriptor{Digest: d1}); err != nil {
|
||||
if err := content.WriteBlob(ctx, cs, "c1", bytes.NewReader(c1), ocispec.Descriptor{Digest: d1, Size: int64(len(c1))}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ func discardWriter(t *testing.T, w content.Writer) {
|
||||
func checkCommitErrorState(ctx context.Context, t *testing.T, cs content.Store) {
|
||||
c1, d1 := createContent(256)
|
||||
_, d2 := createContent(256)
|
||||
if err := content.WriteBlob(ctx, cs, "c1", bytes.NewReader(c1), ocispec.Descriptor{Digest: d1}); err != nil {
|
||||
if err := content.WriteBlob(ctx, cs, "c1", bytes.NewReader(c1), ocispec.Descriptor{Digest: d1, Size: int64(len(c1))}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user