Read the seat mesh-placement's state through the sdk's PlacementsOf, and write the test mesh's placement as the seat does, one key per module and node (issue 774, research 072 row 37)

This commit is contained in:
2026-10-31 09:29:32 +01:00
parent 747bfa71aa
commit 35a7ff70fe
4 changed files with 17 additions and 13 deletions
+8 -3
View File
@@ -201,11 +201,16 @@ func (m *Mesh) Placed(t *testing.T, tools map[string][]string, on map[string][]s
for _, module := range placed {
p.Modules = append(p.Modules, delivery.PlacedModule{Module: module})
}
raw, _ := json.Marshal(p)
key, _ := delivery.PlacementKey(node)
if _, err := placement.Put(key, raw); err != nil {
// As the seat writes it: its node key and a key per module (research 072 row 37).
values, err := delivery.PlacementValues(p)
if err != nil {
t.Fatal(err)
}
for key, raw := range values {
if _, err := placement.Put(key, raw); err != nil {
t.Fatal(err)
}
}
}
}