The node agent waits for a backup's end on the holder's event, not by polling; the manifest consumes it (R6-A A5)

This commit is contained in:
2026-10-24 17:03:30 +02:00
parent 20d0998cdd
commit e5a06cc73d
6 changed files with 158 additions and 53 deletions
+17
View File
@@ -52,3 +52,20 @@ func TestTheManifestDeclaresTheOperatorKeysFileFedByASetting(t *testing.T) {
}
t.Fatal("module.json declares no operator-keys file")
}
// The node agent hears the end of a backup on the event of node-backup's holder, so the manifest consumes it.
func TestTheManifestConsumesTheBackupEvent(t *testing.T) {
raw, err := os.ReadFile("../module.json")
if err != nil {
t.Fatal(err)
}
var m struct {
Consumes []string `json:"consumes"`
}
if err := json.Unmarshal(raw, &m); err != nil {
t.Fatal(err)
}
if len(m.Consumes) != 1 || m.Consumes[0] != "restic.backed-up" {
t.Fatalf("consumes %v", m.Consumes)
}
}