The carried-switch test names no real node or address (review round 1)
mesh/delivery merged: source.main moved to novox/mesh-catalog@23a280a664be
mesh/check being carried to ee6d7c284da9 on 23a280a664be | from f1c04801e477
mesh/delivery merged: source.main moved to novox/mesh-catalog@23a280a664be
mesh/check being carried to ee6d7c284da9 on 23a280a664be | from f1c04801e477
This commit is contained in:
@@ -233,17 +233,17 @@ func TestSwitchesAnswersBothCauses(t *testing.T) {
|
||||
// licence) and is answered with `to` and `consumers`, and found by them.
|
||||
func TestSwitchesAnswersCarriedEntries(t *testing.T) {
|
||||
rt := newRuntime(t)
|
||||
rt.seedLog(licences.EntryAudit, "switched", map[string]any{"at": "2026-11-11T21:10:33Z", "consumer": "novox",
|
||||
"licence": "d", "from": "c", "by": "jschoubben@novox.be"})
|
||||
rt.seedLog(licences.EntryAudit, "switched", map[string]any{"at": "2026-11-11T21:10:33Z", "consumer": "n1",
|
||||
"licence": "d@example.org", "from": "c@example.org", "by": "a@example.org"})
|
||||
r := rt.reader()
|
||||
for _, args := range []map[string]any{nil, {"consumer": "novox"}, {"licence": "d"}} {
|
||||
for _, args := range []map[string]any{nil, {"consumer": "n1"}, {"licence": "d@example.org"}} {
|
||||
got := run(t, r, "licences_switches", args).([]any)
|
||||
if len(got) != 1 {
|
||||
t.Fatalf("%v: %v", args, got)
|
||||
}
|
||||
e := got[0].(map[string]any)
|
||||
if e["to"] != "d" || e["from"] != "c" || e["by"] != "jschoubben@novox.be" ||
|
||||
len(e["consumers"].([]any)) != 1 || e["consumers"].([]any)[0] != "novox" {
|
||||
if e["to"] != "d@example.org" || e["from"] != "c@example.org" || e["by"] != "a@example.org" ||
|
||||
len(e["consumers"].([]any)) != 1 || e["consumers"].([]any)[0] != "n1" {
|
||||
t.Fatalf("%v: %v", args, e)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user