Read the stored manifest through the record's own reader in the silent-file test

This commit is contained in:
2026-10-24 19:06:05 +02:00
parent 370673195c
commit 4ab4529440
@@ -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)
}