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) {