diff --git a/internal/inventory/stored_silent_file_test.go b/internal/inventory/stored_silent_file_test.go index 715bcf1b..cf664fce 100644 --- a/internal/inventory/stored_silent_file_test.go +++ b/internal/inventory/stored_silent_file_test.go @@ -39,11 +39,15 @@ func TestAStoredBuildWithASilentMergeableFileIsStillReadAndComposed(t *testing.T t.Fatal(err) } - kept, found, err := inv.BuildByID(ctx, b.ID) - if err != nil || !found { - t.Fatalf("the stored build is not read again: found %v, %v", found, err) + c, err := inv.theChain(ctx) + if err != nil { + t.Fatal(err) } - m, err := catalogue.ParseManifest(kept.Manifest) + raw, err := inv.chainManifestOf(ctx, c, b.ID) // the manifest as the record keeps it, read from its digest when need be + if err != nil || len(raw) == 0 { + t.Fatalf("the stored build is not read again: %d bytes, %v", len(raw), err) + } + m, err := catalogue.ParseManifest(raw) if err != nil { t.Fatalf("the stored manifest is not read again: %v", err) }