H5 names-no-version: a want naming no version is held as naming no version

Builds: design 47 H2 H-A-673 (hq 6b8373ce)
This commit is contained in:
2026-11-25 17:06:09 +01:00
parent 174cb9dcd8
commit 3753d4d5dc
2 changed files with 15 additions and 3 deletions
+9 -2
View File
@@ -71,6 +71,7 @@ func aWantNamingItsVersionIsResolvedThroughTheRegistrySeats(t *testing.T) {
parts map[string]string
missing string // a word the reason holds
said []string
holds string // the words the module's hold says (entryHolds), when it is held
// pkg names a package artifact the builder's done key carries with no reference beside what the build made: the key
// frombus hands takein.Manifest (H-A-466).
pkg string
@@ -88,7 +89,11 @@ func aWantNamingItsVersionIsResolvedThroughTheRegistrySeats(t *testing.T) {
refs: map[string]string{"mail:server": "artifact-store://mail/server/blobs/" + d("9"),
"mail:files": "artifact-store://mail/files/blobs/" + d("1"), "mail:web": "container-image-registry/mail/web@" + d("3")}},
"a version a seat does not hold": {want: meshwants.WantsByWantNodeModuleValue{Fp: fp, Version: "2.0.0", Self: true},
missing: "2.0.0", said: []string{"mail at version 2.0.0", "oci-artifact-registry", "container-image-registry"}},
missing: "2.0.0", said: []string{"mail at version 2.0.0", "oci-artifact-registry", "container-image-registry"},
holds: "names no digest for"},
// Design 47 H2 H-A-673: a want with a fingerprint and no version is held as naming no version, not no digest.
"a want naming no version": {want: meshwants.WantsByWantNodeModuleValue{Fp: fp, Self: true},
missing: "mail:", holds: "the want of mail names no version, so the node composes nothing new of it"},
"a seat that does not answer": {want: meshwants.WantsByWantNodeModuleValue{Fp: fp, Version: "1.2.3", Self: true}, down: "container-image-registry",
missing: "mail:web", said: []string{"mail at version 1.2.3: the seat container-image-registry"}},
"a package artifact": {want: meshwants.WantsByWantNodeModuleValue{Fp: fpPkg, Version: "1.2.3", Self: true}, entry: &withPackage,
@@ -139,8 +144,10 @@ func aWantNamingItsVersionIsResolvedThroughTheRegistrySeats(t *testing.T) {
if parts != nil || b != nil || !strings.Contains(missing, row.missing) {
t.Errorf("%s: parts %v, build %v, missing %q: want the module held whole, naming %s", name, parts, b, missing, row.missing)
}
if c.entryHolds()["mail"] == "" {
if held := c.entryHolds()["mail"]; held == "" {
t.Errorf("%s: the module is not held", name)
} else if !strings.Contains(held, row.holds) {
t.Errorf("%s: held as %q, want words naming %q", name, held, row.holds)
}
for _, w := range row.said {
if !strings.Contains(strings.Join(said, "\n"), w) {