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) } }