diff --git a/modules/mesh-delivery-indexer/cmd/mesh-delivery-indexer/packages_integration_test.go b/modules/mesh-delivery-indexer/cmd/mesh-delivery-indexer/packages_integration_test.go index 29eaca773..36e635a1a 100644 --- a/modules/mesh-delivery-indexer/cmd/mesh-delivery-indexer/packages_integration_test.go +++ b/modules/mesh-delivery-indexer/cmd/mesh-delivery-indexer/packages_integration_test.go @@ -400,6 +400,27 @@ func TestASourceRevisionMovingMeshSDKNamesItAndItsImporters(t *testing.T) { } untilModule(t, ctx, js, "legacy", func(m meshcatalog.ModulesByModuleValue) bool { return m.Packages[sdkGo] == "v0.1.29" }) + // DMC-1, H-A-547 (2): the next take-in moving mesh-sdk (m3 changes buildstep again) names it with no version in the + // import-form importer's entry of that take-in's revision, so the importer's build waits for this pipeline's publish; + // legacy, of the version line, keeps its pin. + heard.acked(t, "main") + say(13, false, meshdelivery.SourceMovedEventHeadsItem{Repository: "novox/mesh-sdk", Commit: m3}) + taken = heard.next(t, "main", 13) + untilRevision(taken.Revision) + _, entries, err := index.ReadRevision(ctx, objects, index.BranchObject("main", taken.Revision)) + if err != nil { + t.Fatal(err) + } + for module, want := range map[string]string{"importer": "", "legacy": "v0.1.29"} { + i := slices.IndexFunc(entries, func(e meshcatalog.CatalogEntry) bool { return e.Module == module }) + if i < 0 { + t.Fatalf("main.%d holds no entry of %s", taken.Revision, module) + } + if v, named := entries[i].Packages[sdkGo]; !named || v != want { + t.Errorf("main.%d's entry of %s names mesh-sdk at %q (named %v), want %q", taken.Revision, module, v, named, want) + } + } + // A branch's take-in moving mesh-sdk to m3 is a dry run: its packages stay in dry-runs while it runs, the trunk's are // untouched, and its keys go once it answered (ยง804). heard.acked(t, "main")