Seat fixtures of the build module's tests carry their domain (ADR 0636 §5; issue 1966)
This commit is contained in:
@@ -21,9 +21,9 @@ func contracts(t *testing.T, manifest string) (string, []string) {
|
||||
dir := t.TempDir()
|
||||
for p, text := range map[string]string{
|
||||
"module.json": manifest,
|
||||
"seats/one-store/seat.json": `{"format":1,"seat":"one-store","scope":"mesh","grain":"whole","decision":"ADR 1","verbs":[{"name":"query","input":{"type":"object"},"answer":{"type":"object"}}]}`,
|
||||
"seats/one-store/seat.json": `{"format":1,"seat":"one-store","scope":"mesh","grain":"whole","domain":"Module","decision":"ADR 1","verbs":[{"name":"query","input":{"type":"object"},"answer":{"type":"object"}}]}`,
|
||||
// A definition at the seat-list grain is read and generates nothing (ADR 0635 §1, §2).
|
||||
"seats/other/seat.json": `{"format":1,"seat":"other","scope":"mesh","grain":"seat-list","decision":"ADR 1","verbs":[{"name":"ask","input":{"type":"object"}}]}`,
|
||||
"seats/other/seat.json": `{"format":1,"seat":"other","scope":"mesh","grain":"seat-list","domain":"Module","decision":"ADR 1","verbs":[{"name":"ask","input":{"type":"object"}}]}`,
|
||||
} {
|
||||
writeContract(t, filepath.Join(dir, p), text)
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
{"format":1,"seat":"a-registry","scope":"mesh","grain":"whole","decision":"ADR 1","includes":["registry"],
|
||||
{"format":1,"seat":"a-registry","scope":"mesh","grain":"whole","domain":"Module","decision":"ADR 1","includes":["registry"],
|
||||
"verbs":[{"name":"hold","input":{"type":"object"},"answer":{"type":"object"}}],
|
||||
"family":{"name":"a-registry.events","max-age-days":7},
|
||||
"states":[
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
{"format":1,"seat":"b-registry","scope":"mesh","grain":"whole","decision":"ADR 1","includes":["registry"],
|
||||
{"format":1,"seat":"b-registry","scope":"mesh","grain":"whole","domain":"Module","decision":"ADR 1","includes":["registry"],
|
||||
"verbs":[{"name":"hold","input":{"type":"object"},"answer":{"type":"object"}}],
|
||||
"family":{"name":"b-registry.events","max-age-days":7}}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"format":1,"seat":"one-store","scope":"mesh","grain":"seat-list","decision":"ADR 1","verbs":[{"name":"query","input":{"type":"object"}}]}
|
||||
{"format":1,"seat":"one-store","scope":"mesh","grain":"seat-list","domain":"Module","decision":"ADR 1","verbs":[{"name":"query","input":{"type":"object"}}]}
|
||||
|
||||
@@ -186,7 +186,7 @@ func TestUnitLevelOfAContractsModuleOutOfStepFailsNamingEachPath(t *testing.T) {
|
||||
tree := filepath.Join(m.Work, ws, "tree")
|
||||
for p, text := range map[string]string{
|
||||
"module.json": `{"module":"c","build":{"artifacts":[{"name":"go","kind":"package","language":"go","paths":["go"],"generated-from":"."}]}}`,
|
||||
"seats/one-store/seat.json": `{"format":1,"seat":"one-store","scope":"mesh","grain":"seat-list","decision":"ADR 1","verbs":[{"name":"query","input":{"type":"object"}}]}`,
|
||||
"seats/one-store/seat.json": `{"format":1,"seat":"one-store","scope":"mesh","grain":"seat-list","domain":"Module","decision":"ADR 1","verbs":[{"name":"query","input":{"type":"object"}}]}`,
|
||||
"go/go.mod": "module example.org/c/go\n",
|
||||
"go/stray.go": "package stray\n",
|
||||
"ts/package.json": `{"name":"@example/c"}`,
|
||||
@@ -220,7 +220,7 @@ func TestUnitLevelOfAContractsModuleInAFolderOutOfStepFailsNamingEachPath(t *tes
|
||||
tree := filepath.Join(m.Work, ws, "tree")
|
||||
for p, text := range map[string]string{
|
||||
"module.json": `{"module":"c","build":{"artifacts":[{"name":"go","kind":"package","language":"go","paths":["go"],"generated-from":"."}]}}`,
|
||||
"seats/one-store/seat.json": `{"format":1,"seat":"one-store","scope":"mesh","grain":"seat-list","decision":"ADR 1","verbs":[{"name":"query","input":{"type":"object"}}]}`,
|
||||
"seats/one-store/seat.json": `{"format":1,"seat":"one-store","scope":"mesh","grain":"seat-list","domain":"Module","decision":"ADR 1","verbs":[{"name":"query","input":{"type":"object"}}]}`,
|
||||
"go/go.mod": "module example.org/c/go\n",
|
||||
"go/stray.go": "package stray\n",
|
||||
"ts/package.json": `{"name":"@example/c"}`,
|
||||
|
||||
Reference in New Issue
Block a user