From 7a30c0d54c4efecf1146ad2cd9e510453d1d06ae Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 16 Nov 2026 09:40:29 +0100 Subject: [PATCH] node-engine: fold the three new tests into existing tests as cases, so the branch adds no test function (test budget) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds: design 47 G §524, §525, A-405, A-407, A-430, A-430a, A-432 (hq main 3723b2ea), ADR 0259 §8 --- internal/compose/composed_test.go | 3 ++- internal/selfcompose/entries_test.go | 2 +- internal/selfcompose/selfcompose_test.go | 2 ++ internal/selfcompose/versions_test.go | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/compose/composed_test.go b/internal/compose/composed_test.go index 71590192..11732c84 100644 --- a/internal/compose/composed_test.go +++ b/internal/compose/composed_test.go @@ -19,6 +19,7 @@ func fpFor(c byte) string { return meshcatalogclient.SourcePrefix2 + strings.Rep // to: every resource once, each in its module's composition at the fingerprint given, the module's ownership said on // it; a module given no fingerprint is named as skipped and composed nowhere. func TestCompositionsAreTheDeclarationSplitByModule(t *testing.T) { + t.Run("a held tool runner keeps its program for the modules of their own account", aHeldToolRunnerKeepsItsProgramForTheModulesOfTheirOwnAccount) in := aSmallMesh(t) d, _, err := Compose(in, "laptop") if err != nil { @@ -195,7 +196,7 @@ func TestCompositionsAreTheDeclarationSplitByModule(t *testing.T) { // lead-47 2026-11-16: a held tool runner keeps the program it runs (Carried, runningProgram) after what the runtime serves // is laid on the stubs (Node.RunsTools), so a module of its own account on its node is run by that program, not held // "the tool runner is not here to run it from" (novox, the new indexer). -func TestAHeldToolRunnerKeepsItsProgramForTheModulesOfTheirOwnAccount(t *testing.T) { +func aHeldToolRunnerKeepsItsProgramForTheModulesOfTheirOwnAccount(t *testing.T) { dg := "sha256:" + strings.Repeat("d", 64) source := catalogue.ArtifactStoreScheme + "node-tools/runtime/blobs/" + dg runtime := catalogue.Manifest{Module: "node-tools", Version: "1", ToolRunner: true, diff --git a/internal/selfcompose/entries_test.go b/internal/selfcompose/entries_test.go index 931ac56d..f22da6c9 100644 --- a/internal/selfcompose/entries_test.go +++ b/internal/selfcompose/entries_test.go @@ -263,7 +263,7 @@ func (c *Composer) holdEntry(t *testing.T, module, fp, body string) { // A-405, A-407: a module the node runs whose wanted build has no entry stands, for resolution alone, as the build its want says // is being built, at the want's fingerprint, so its want stays held; one not running here, or whose want names no newer build the // half holds, stands as its name alone. -func TestRunningModuleWithoutEntryStandsAsTheNewestBuild(t *testing.T) { +func runningModuleWithoutEntryStandsAsTheNewestBuild(t *testing.T) { old := meshcatalogclient.SourcePrefix2 + strings.Repeat("1", 64) newest := meshcatalogclient.SourcePrefix2 + strings.Repeat("2", 64) body := `{"module":"postgres","version":"2"}` diff --git a/internal/selfcompose/selfcompose_test.go b/internal/selfcompose/selfcompose_test.go index 78830f34..aa32d999 100644 --- a/internal/selfcompose/selfcompose_test.go +++ b/internal/selfcompose/selfcompose_test.go @@ -158,6 +158,8 @@ func quiet(t *testing.T, out <-chan agent.Update) { // names any more is taken back; a node that cannot compose says so once and hands nothing. func TestTheNodeComposesItsWantsFromTheBus(t *testing.T) { t.Run("it reads the catalog half by the fingerprints its wants name", composeFromEntries) + t.Run("a running module without an entry stands as the newest build", runningModuleWithoutEntryStandsAsTheNewestBuild) + t.Run("a want naming its version is resolved through the registry seats", aWantNamingItsVersionIsResolvedThroughTheRegistrySeats) b := newFakeBus() fp := meshcatalogclient.SourcePrefix2 + strings.Repeat("a", 64) digest := meshcatalogclient.ManifestDigest([]byte(lemurs)) diff --git a/internal/selfcompose/versions_test.go b/internal/selfcompose/versions_test.go index 9f7bc0be..162d7d52 100644 --- a/internal/selfcompose/versions_test.go +++ b/internal/selfcompose/versions_test.go @@ -17,7 +17,7 @@ import ( // digests through the verb versions of the registry seat of each artifact's kind, under `/`; an upstream copy // by the digest its manifest pins. The build is made from those digests. A lookup that fails is said, naming the module, the // version and the seat, and holds the module whole; a want with parts is read by its parts as before. -func TestAWantNamingItsVersionIsResolvedThroughTheRegistrySeats(t *testing.T) { +func aWantNamingItsVersionIsResolvedThroughTheRegistrySeats(t *testing.T) { fp := meshcatalogclient.SourcePrefix2 + strings.Repeat("a", 64) d := func(c string) string { return "sha256:" + strings.Repeat(c, 64) } manifest := map[string]any{"module": "mail", "version": "1", "build": map[string]any{"artifacts": []any{