Merge commit '5e9fd3bd' into feat/47-H2-corrections
This commit is contained in:
@@ -217,7 +217,7 @@ func acceptedSeries(series map[string]SeriesPackage, m catalogue.Manifest, repos
|
||||
for _, key := range slices.Sorted(maps.Keys(series)) {
|
||||
s := series[key]
|
||||
pinned := pinnedVersion(s)
|
||||
if s.GoModule == "" || pinned == nil || pinned.Contents == nil || m.AcceptedSeries(s.Name) != s.Series {
|
||||
if s.GoModule == "" || pinned == nil || m.AcceptedSeries(s.Name) != s.Series {
|
||||
continue
|
||||
}
|
||||
if repo, _, ok := trunk.PackageRepository(s.GoModule); !ok || trunk.SameRepository(repo, repository) {
|
||||
|
||||
@@ -829,6 +829,20 @@ func TestAModuleKeepsTheToolchainsItsFingerprintWasComputedWith(t *testing.T) {
|
||||
if b, _ := moduleOf(t, mods, "avahi"); b.Fp2 != a.Fp2 || b.Packages[sdk] != "v0.1.20" {
|
||||
t.Fatalf("a publish of another series moved avahi: fp2 %q (was %q) packages %v", b.Fp2, a.Fp2, b.Packages)
|
||||
}
|
||||
// H-A-748: a version published and not yet released (0.1.25, above the released pin) moves nothing, and acceptedSeries
|
||||
// gives the released pin although the series holds no contents for it.
|
||||
if _, err := ix.HearVersion(context.Background(), HeardVersion{Package: "mesh-sdk/go", Seat: "go-package-registry", Version: "0.1.25", Commit: strings.Repeat("1", 40), GoModule: sdk, Published: true}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := acceptedSeries(ix.pinnedSeries(context.Background()), catalogue.Manifest{}, "novox/mesh-delivery")[sdk]; got != "v0.1.20" {
|
||||
t.Errorf("acceptedSeries pins %q with 0.1.25 only published, want the released v0.1.20", got)
|
||||
}
|
||||
if _, err := ix.Repin(context.Background(), "mesh-sdk", "0.1.27"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if c, _ := moduleOf(t, mods, "avahi"); c.Fp2 != a.Fp2 || c.Packages[sdk] != "v0.1.20" {
|
||||
t.Fatalf("a version published and not released moved avahi: fp2 %q (was %q) packages %v", c.Fp2, a.Fp2, c.Packages)
|
||||
}
|
||||
}
|
||||
if o, _ := moduleOf(t, mods, "mesh-tools"); o.Fp2 != tools.Fp2 {
|
||||
t.Errorf("a re-pin moved mesh-tools, which holds no package of mesh-sdk: %q (was %q)", o.Fp2, tools.Fp2)
|
||||
|
||||
Reference in New Issue
Block a user