diff --git a/modules/mesh-delivery-indexer/internal/index/graph_registrations_test.go b/modules/mesh-delivery-indexer/internal/index/graph_registrations_test.go index 6df8be27..bceedf9f 100644 --- a/modules/mesh-delivery-indexer/internal/index/graph_registrations_test.go +++ b/modules/mesh-delivery-indexer/internal/index/graph_registrations_test.go @@ -77,9 +77,9 @@ func TestAModuleEnteringTheTrunkGraphIsRegistered(t *testing.T) { other := steps other.Lint = "optional" held := []meshcatalog.Registration{ - {Module: "core", Origin: "novox/c", Path: "go/core/module.json", Branches: []string{"main"}, Policy: meshcatalog.Policy{Steps: steps, + {Module: "core", Origin: "novox/c", Path: "go/core/module.json", Branches: []string{"stable"}, Policy: meshcatalog.Policy{Steps: steps, Artifacts: map[string]meshcatalog.StepStatuses{"lib": {Integration: "bypass"}, "files": {Lint: "bypass", Unit: "bypass"}}}}, - {Module: "tools", Origin: "novox/c", Path: "go/tools/module.json", Branches: []string{"main"}, Policy: meshcatalog.Policy{Steps: steps, + {Module: "tools", Origin: "novox/c", Path: "go/tools/module.json", Branches: []string{"stable"}, Policy: meshcatalog.Policy{Steps: steps, Artifacts: map[string]meshcatalog.StepStatuses{"lib": {Integration: "bypass"}, "files": {Unit: "bypass"}}}}, {Module: "x1", Origin: "novox/mixed", Path: "x1/module.json", Branches: []string{"main"}, Policy: meshcatalog.Policy{Steps: steps}}, {Module: "x2", Origin: "novox/mixed", Path: "x2/module.json", Branches: []string{"beta"}, Policy: meshcatalog.Policy{Steps: other}}, @@ -112,8 +112,8 @@ func TestAModuleEnteringTheTrunkGraphIsRegistered(t *testing.T) { return r } lib2 := got("lib2") - if lib2.Version != 1 || lib2.Origin != "novox/c" || lib2.Path != "go/lib2/module.json" || !slices.Equal(lib2.Branches, []string{TrunkBranch}) { - t.Errorf("lib2 registered as %+v, want version 1 from novox/c, go/lib2/module.json, watching main", lib2) + if lib2.Version != 1 || lib2.Origin != "novox/c" || lib2.Path != "go/lib2/module.json" || !slices.Equal(lib2.Branches, []string{"stable"}) { + t.Errorf("lib2 registered as %+v, want version 1 from novox/c, go/lib2/module.json, watching stable, the branch its siblings watch first alike (H-A-266), not its default branch main", lib2) } if lib2.Policy.Steps != steps { t.Errorf("lib2's steps %+v, want its repository's modules' alike steps %+v (H-A-263)", lib2.Policy.Steps, steps)