Files
mesh-catalog/modules/mesh-build-image/cmd/mesh-build-image/steps_test.go
T
jschoubben 4ad5f40817 BLD7, BLD8: the Node and image build seats serve the verb steps
Node answers the type-check as lint always, unit where a package has a test
script and integration where it has test:integration, kept in detected-steps by
fingerprint as the Go module keeps it; the image answers none. The manifests
serve it. The step ask's end (step-ended) of BLD7 and BLD8 waits for BLD3 and
the build-step package of mesh-delivery-sdk.

Builds: design 47 G §22, §307, §326, §328

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
2026-11-11 11:06:40 +01:00

25 lines
772 B
Go

package main
import "testing"
// Design 47 G §22, §328 (BLD8): the verb steps is served and answers none for an image.
func TestTheStepsVerbAnswersNoStepForAnImage(t *testing.T) {
served := false
for _, tool := range (&Module{}).SeatTools(nil) {
if tool.Name == Seat+".steps" {
served = true
got, err := tool.Run(map[string]any{"module": "m", "artifact": "m:server", "fingerprint": "fp"})
a, ok := got.(StepsAnswer)
if err != nil || !ok || a.Artifact != "m:server" || a.Steps == nil || len(a.Steps) != 0 {
t.Errorf("steps = %+v (%v)", got, err)
}
if _, err := tool.Run(map[string]any{"module": "m"}); err == nil {
t.Error("an ask with no artifact was answered")
}
}
}
if !served {
t.Fatal("the module serves no verb steps")
}
}