From 4ab45294405debed3633a088d6fa0de7065bc754 Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 24 Oct 2026 19:06:05 +0200 Subject: [PATCH] Read the stored manifest through the record's own reader in the silent-file test --- internal/inventory/stored_silent_file_test.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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) }