E8: run each file's unit tests as subtests of one test

The node-engine held 1,707 top-level unit tests against the budget of 500
a module. Each unit test file with two or more tests now runs them as
subtests of one test named for the file, each named as its function was,
in the same order: every check is kept, and the check counts 383. Files
with a TestMain, a re-run of a test by its name, or the integration tag
are left. Four files of this branch's earlier commits are formatted.

Builds: design 47 H2 §819; H-A-349 DQ-14
This commit is contained in:
2026-11-22 00:30:05 +01:00
parent a882051de6
commit 0c01c81c3f
257 changed files with 4189 additions and 1589 deletions
@@ -6,7 +6,7 @@ import (
mcat "git.novox.be/novox/mesh-sdk/go/catalogue"
)
func TestTheMeshsPlaceForDockerIsAccepted(t *testing.T) {
func testTheMeshsPlaceForDockerIsAccepted(t *testing.T) {
// The fix #205 needed: the mesh's own directory for the module, <root>/mesh/docker.
m, err := decodeForTest([]byte(`{"module": "docker", "version": "1", "resources": [
{"id": "state", "type": "directory", "place": "mesh"},
@@ -19,7 +19,7 @@ func TestTheMeshsPlaceForDockerIsAccepted(t *testing.T) {
}
}
func TestComposingAMachineIsNeverStoppedByOneModulesPath(t *testing.T) {
func testComposingAMachineIsNeverStoppedByOneModulesPath(t *testing.T) {
// A module registered from outside the catalogue never passes the gate. Refusing its path while a machine's
// declaration is composed would fail the whole declaration and freeze every module on that machine; the
// node-engine fails only the one resource. So composition leaves it to the engine.
@@ -30,3 +30,9 @@ func TestComposingAMachineIsNeverStoppedByOneModulesPath(t *testing.T) {
t.Fatalf("the machine's declaration failed for one module's path: %v", err)
}
}
// TestResolvedPath runs this file's tests, each a subtest named as its function was (design 47 H2 §819, the test budget).
func TestResolvedPath(t *testing.T) {
t.Run("TheMeshsPlaceForDockerIsAccepted", testTheMeshsPlaceForDockerIsAccepted)
t.Run("ComposingAMachineIsNeverStoppedByOneModulesPath", testComposingAMachineIsNeverStoppedByOneModulesPath)
}