From 480657d95b9b023fa3761c0a16535de677e8b945 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 14 Oct 2026 21:43:20 +0200 Subject: [PATCH] Register the module a walk's store test compares with, as the mesh runs it (review of #336) --- cmd/mesh-controller/same_program_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/mesh-controller/same_program_test.go b/cmd/mesh-controller/same_program_test.go index a7c91932..479dce8b 100644 --- a/cmd/mesh-controller/same_program_test.go +++ b/cmd/mesh-controller/same_program_test.go @@ -6,6 +6,7 @@ import ( "testing" "time" + "github.com/novox/mesh-controller/internal/catalogue" "github.com/novox/mesh-controller/internal/inventory" "github.com/novox/mesh-controller/internal/link" ) @@ -107,6 +108,12 @@ func TestAWalkWhoseEveryBuildCameOutTheSameIsDone(t *testing.T) { Sources: []inventory.BuildSource{{Paths: []string{"main.go", "go.mod"}}}}); err != nil { t.Fatal(err) } + // What runs: the module registered with that build's image (RegisteredHeld reads the module table). + if err := inv.RegisterModule(ctx, catalogue.Manifest{Module: "one", Version: "1", Resources: []map[string]any{ + {"id": "app", "type": "container", "name": "one", "image": "store/one@sha256:aaaa"}}}, + inventory.Source{Repository: "novox/one", Ref: "main", BuiltFrom: "c0", Asked: t0.Add(-time.Hour)}); err != nil { + t.Fatal(err) + } pull := link.PullRef{Owner: "novox", Repo: "one", Number: 7} was := checkedBuildsOf checkedBuildsOf = func(context.Context, []link.PullRef) ([]link.CheckedBuild, error) {