Files
mesh-delivery/modules/mesh-delivery-sdk/buildstep/seat_acts_test.go
T
jschoubben 71a35a6376 MV1: move contracts and sdk under modules/, importers follow
The delivery repository's contracts and SDK live under modules/ as
mesh-delivery-contracts and mesh-delivery-sdk, their Go module paths
renamed to match the folders (the TypeScript names already did), and
every importer in mesh-delivery, mesh-catalog, mesh-host, mesh-tools
and mesh-sdk follows in the same group: a design as it should be, one
path per module, checked by the group's check building every importer.

Builds: design 47 G §427, §88

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 05:09:56 +01:00

25 lines
692 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("../../mesh-delivery-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)
}
}