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
@@ -26,7 +26,7 @@ func processModule(env map[string]any) mcat.Manifest {
}
}
func TestAProcessIsToldItsPortAndItsPlaceInItsEnvironment(t *testing.T) {
func testAProcessIsToldItsPortAndItsPlaceInItsEnvironment(t *testing.T) {
env := map[string]any{
"SHOWCASE_URL": "http://127.0.0.1:${port:8080}",
"SHOWCASE_DATA": "${dir:data}/objects",
@@ -62,7 +62,7 @@ func TestAProcessIsToldItsPortAndItsPlaceInItsEnvironment(t *testing.T) {
// An unknown reference in a process's environment is refused as a container's is, naming the
// process and the variable — left alone, it would reach the machine as a literal.
func TestAProcessAskingAboutAnUndeclaredPortIsRefused(t *testing.T) {
func testAProcessAskingAboutAnUndeclaredPortIsRefused(t *testing.T) {
env := map[string]any{"SHOWCASE_URL": "http://127.0.0.1:${port:9999}"}
_, err := Declaration(mcat.Resolution{Node: "anchor", Modules: []mcat.Manifest{processModule(env)}}, mcat.Rendering{})
if err == nil {
@@ -80,3 +80,9 @@ func TestAProcessAskingAboutAnUndeclaredPortIsRefused(t *testing.T) {
t.Fatalf("a process naming no directory of its module was not refused: %v", err)
}
}
// TestProcessEnv runs this file's tests, each a subtest named as its function was (design 47 H2 §819, the test budget).
func TestProcessEnv(t *testing.T) {
t.Run("AProcessIsToldItsPortAndItsPlaceInItsEnvironment", testAProcessIsToldItsPortAndItsPlaceInItsEnvironment)
t.Run("AProcessAskingAboutAnUndeclaredPortIsRefused", testAProcessAskingAboutAnUndeclaredPortIsRefused)
}