Files
mesh-delivery/sdk/buildstep/seat_acts_test.go
T
jschoubben 5f3410cd24 Fix 10: the node-build-image acting-rule test lives beside the other hand-written tests; the pipeline's go.mod drops an unused require
Item 3: seatgen -check no longer names go/seats/nodebuildimage/acts_test.go (not written by the generator); the
test moves to the domain SDK's buildstep, which already reads the build seats' definitions. mesh-delivery-pipeline
no longer imports meshmoduleassigner.

Builds: design 47 G §324, §397

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 02:19:06 +01:00

25 lines
678 B
Go

package buildstep
import (
"encoding/json"
"os"
"testing"
)
// The seat's `build` acting rule matches an artifact by its kind, an image having no language (design 47 G §324, §397).
func TestTheSeatsBuildRuleActsOnTheKindImage(t *testing.T) {
raw, err := os.ReadFile("../../contracts/seats/node-build-image/seat.json")
if err != nil {
t.Fatal(err)
}
var def struct {
Acts []struct{ Step, On, Bound string } `json:"acts"`
}
if err := json.Unmarshal(raw, &def); err != nil {
t.Fatal(err)
}
if len(def.Acts) != 1 || def.Acts[0].Step != "build" || def.Acts[0].On != "kind:image" {
t.Errorf("acts = %+v; wanted the one rule {build, kind:image}", def.Acts)
}
}