Read the backup holders of every machine, and the notes fixture's data at a resource (issues 1065, 1066)
mesh/merge-gate waits for its group's composed check
mesh/repo-check head 08e000bb56aa merged into trunk 7c9c187ca6e2 beside mesh-catalog#353@c898a937 — fail: its merge-check.sh failed: --- FAIL: TestADeliver…
mesh/delivery-group group feat/backup-before-send rejected: a member's own check failed
mesh/delivery superseded: a newer head of the same pull request

This commit is contained in:
2026-10-17 23:04:52 +02:00
parent a39d6ce78d
commit 08e000bb56
3 changed files with 44 additions and 7 deletions
+15
View File
@@ -222,3 +222,18 @@ func TestAPlanThatMovesNoBackedUpItemAsksNothing(t *testing.T) {
t.Fatalf("proceed=%v err=%v record=%+v asked=%v", proceed, err, p.Backups, seat.asked)
}
}
// The holders of a node seat are every machine's, and a source that fails is no machine without a holder.
func TestTheBackupHoldersAreEveryMachinesAndAFailedReadIsNotNoHolder(t *testing.T) {
entries := func(context.Context) ([]inventory.Entry, error) {
return []inventory.Entry{aModuleWith(t, "mail", []string{"ace", "g14"}, anItem("a", ""))}, nil
}
f, err := loadBackupFactsFrom(entries, func() ([]catalogue.Held, error) { return holders("ace", "g14"), nil }, t.Context())
if err != nil || !f.holder["ace"] || !f.holder["g14"] {
t.Fatalf("%+v %v", f, err)
}
if _, err := loadBackupFactsFrom(entries, func() ([]catalogue.Held, error) { return nil, fmt.Errorf("store down") },
t.Context()); err == nil || !strings.Contains(err.Error(), "store down") {
t.Fatalf("a failed read of the holders must fail the step: %v", err)
}
}