SeatsToPassOn tests: a claimant whose running manifest does not claim is not counted; the answer names the settling command
Claude-Session: https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
This commit is contained in:
@@ -54,15 +54,17 @@ func TestSeatsToPassOn(t *testing.T) {
|
|||||||
[]Assignment{{Node: "novox", Manifest: Manifest{Module: "old"}, Unread: true}, {Node: "novox", Manifest: broker("new")}}, "", nil},
|
[]Assignment{{Node: "novox", Manifest: Manifest{Module: "old"}, Unread: true}, {Node: "novox", Manifest: broker("new")}}, "", nil},
|
||||||
{"an unread assignment is no claimant", rec,
|
{"an unread assignment is no claimant", rec,
|
||||||
[]Assignment{{Node: "novox", Manifest: dropped("old")}, {Node: "ace", Manifest: Manifest{Module: "new"}, Unread: true}}, "", nil},
|
[]Assignment{{Node: "novox", Manifest: dropped("old")}, {Node: "ace", Manifest: Manifest{Module: "new"}, Unread: true}}, "", nil},
|
||||||
|
{"a claimant whose running manifest does not claim is not counted", rec,
|
||||||
|
[]Assignment{{Node: "novox", Manifest: dropped("old")}, {Node: "ace", Manifest: dropped("new")}}, "", nil},
|
||||||
{"no claimant keeps the record", rec,
|
{"no claimant keeps the record", rec,
|
||||||
[]Assignment{{Node: "novox", Manifest: dropped("old")}, {Node: "novox", Manifest: dropped("other")}}, "", nil},
|
[]Assignment{{Node: "novox", Manifest: dropped("old")}, {Node: "novox", Manifest: dropped("other")}}, "", nil},
|
||||||
{"holder gone, no claimant keeps the record", rec, nil, "", nil},
|
{"holder gone, no claimant keeps the record", rec, nil, "", nil},
|
||||||
{"one module on two nodes is two claimants: none passed, said", rec,
|
{"one module on two nodes is two claimants: none passed, said", rec,
|
||||||
[]Assignment{{Node: "novox", Manifest: dropped("old")}, {Node: "ace", Manifest: broker("new")}, {Node: "novox", Manifest: broker("new")}},
|
[]Assignment{{Node: "novox", Manifest: dropped("old")}, {Node: "ace", Manifest: broker("new")}, {Node: "novox", Manifest: broker("new")}},
|
||||||
"", []string{"old", "new on ace", "new on novox", "seat mesh-broker --to"}},
|
"", []string{"old", "new on ace", "new on novox", "seat mesh-broker --to <node>/<module>"}},
|
||||||
{"two claimants, holder gone: said", rec,
|
{"two claimants, holder gone: said", rec,
|
||||||
[]Assignment{{Node: "novox", Manifest: broker("a")}, {Node: "ace", Manifest: broker("b")}},
|
[]Assignment{{Node: "novox", Manifest: broker("a")}, {Node: "ace", Manifest: broker("b")}},
|
||||||
"", []string{"a on novox", "b on ace", "seat mesh-broker --to"}},
|
"", []string{"a on novox", "b on ace", "seat mesh-broker --to <node>/<module>"}},
|
||||||
{"a seat with two holders on record is not read", append(rec[:1:1], Held{Claim: "mesh-broker", Scope: ScopeMesh, Node: "ace", Module: "x"}),
|
{"a seat with two holders on record is not read", append(rec[:1:1], Held{Claim: "mesh-broker", Scope: ScopeMesh, Node: "ace", Module: "x"}),
|
||||||
[]Assignment{{Node: "novox", Manifest: broker("new")}}, "", nil},
|
[]Assignment{{Node: "novox", Manifest: broker("new")}}, "", nil},
|
||||||
{"a replicated seat is never passed",
|
{"a replicated seat is never passed",
|
||||||
|
|||||||
Reference in New Issue
Block a user