node-engine: fold the three new tests into existing tests as cases, so the branch adds no test function (test budget)
Builds: design 47 G §524, §525, A-405, A-407, A-430, A-430a, A-432 (hq main 3723b2ea), ADR 0259 §8
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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"}`
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
// digests through the verb versions of the registry seat of each artifact's kind, under `<module>/<artifact>`; 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{
|
||||
|
||||
Reference in New Issue
Block a user