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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user