Archived
Decode manifests in tests and pin the mesh-sdk that no longer holds the judge
Issue 1585, S18/S19: the judge's tests live in mesh-delivery now, so an assertion that only tested judging goes and every test that builds a manifest decodes it. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
@@ -60,7 +60,7 @@ func TestTheAsksLabBus(t *testing.T) {
|
||||
}
|
||||
var manifests []catalogue.Manifest
|
||||
read := func(raw []byte, from string) {
|
||||
m, err := catalogue.ParseManifest(raw)
|
||||
m, err := catalogue.Decode(raw)
|
||||
if err != nil {
|
||||
t.Fatalf("%s: %v", from, err)
|
||||
}
|
||||
|
||||
@@ -476,7 +476,7 @@ func streamsOf(m catalogue.Manifest) []broker.ModuleStream {
|
||||
// queueOwnersOf is every work-queue stream of a module's own that one of its processes names in bus.queues,
|
||||
// with that process's id and the stream's declared max-deliveries (novox/hq ADR 0436 §1, §2, §6). In
|
||||
// resource order, so composition is repeatable; a queue naming a stream the module does not own, or one two
|
||||
// processes name, is caught at registration (catalogue.WorkQueueStreamProblems) and never reaches here.
|
||||
// processes name, is caught at registration (the indexer's judge) and never reaches here.
|
||||
func queueOwnersOf(m catalogue.Manifest) []broker.QueueOwner {
|
||||
buses := m.ProcessBuses()
|
||||
if len(buses) == 0 {
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
// configured is a module in the config form: one value a mergeable file takes, and a directory to place.
|
||||
func configured(t *testing.T, name string) catalogue.Manifest {
|
||||
t.Helper()
|
||||
m, err := catalogue.ParseManifest([]byte(`{"module": "` + name + `", "version": "1",
|
||||
m, err := catalogue.Decode([]byte(`{"module": "` + name + `", "version": "1",
|
||||
"config": {"level": {"type": "string", "description": "how much it says", "default": "info"}},
|
||||
"resources": [{"id": "data", "type": "directory", "mode": "0750"}, {"id": "conf", "type": "file", "path": "/etc/` + name + `.json", "mode": "0640",
|
||||
"content": "{\"level\": \"info\"}", "merge": "json", "takes-config": ["level"]}]}`))
|
||||
|
||||
@@ -44,12 +44,12 @@ func TestOnlyTheServingControllerMayAnswerRootFree(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
controller, err := catalogue.ParseManifest(raw)
|
||||
controller, err := catalogue.Decode(raw)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
parse := func(s string) catalogue.Manifest {
|
||||
m, err := catalogue.ParseManifest([]byte(s))
|
||||
m, err := catalogue.Decode([]byte(s))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -47,13 +47,10 @@ func TestAStoredBuildWithASilentMergeableFileIsStillReadAndComposed(t *testing.T
|
||||
if err != nil || len(raw) == 0 {
|
||||
t.Fatalf("the stored build is not read again: %d bytes, %v", len(raw), err)
|
||||
}
|
||||
m, err := catalogue.ParseManifest(raw)
|
||||
m, err := catalogue.Decode(raw)
|
||||
if err != nil {
|
||||
t.Fatalf("the stored manifest is not read again: %v", err)
|
||||
}
|
||||
if written := catalogue.WrittenSettingsProblems(m); len(written) != 1 {
|
||||
t.Fatalf("the rule this build predates should name its accounts file where it is written: %v", written)
|
||||
}
|
||||
|
||||
// And composed, in today's form: the accounts file still takes its layer's keys.
|
||||
with := catalogue.Rendering{Settings: catalogue.SettingsBy{"mail-client": {{From: "workstation",
|
||||
|
||||
@@ -22,7 +22,7 @@ var adr0367Families = []string{`"mesh-knowledge.reviewed"`, `"mesh-delivery.tran
|
||||
func composeWaits(t *testing.T, families []string, people map[string][]string) (granted, issued []string) {
|
||||
t.Helper()
|
||||
parse := func(s string) catalogue.Manifest {
|
||||
m, err := catalogue.ParseManifest([]byte(s))
|
||||
m, err := catalogue.Decode([]byte(s))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user