I12: the indexer's whole test proves a take-in's revision names a moved package with no version
Review r1 finding 2: removing the take-in's unpinnedByMovers failed no test. I10 now takes mesh-sdk in again after its releases and reads the take-in's revision: the import-form importer names mesh-sdk with no version, legacy (the version line) keeps its pin. Builds: design 47 H2 H-A-532 (DMC-1), H-A-547 (2), H-A-521
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user