Give the data module's test manifest the directory and backup the catalogue asks of an irreplaceable item

This commit is contained in:
2026-10-24 16:26:43 +02:00
parent 204a59dab4
commit 7b18696cd5
@@ -338,7 +338,7 @@ func (b *bed) conditionsSaid(t *testing.T) map[string]asks.Condition {
func TestAFailedDataModuleIsAskedToRestore(t *testing.T) {
b := startBed(t, "")
fNew := delivery.SourcePrefix2 + strings.Repeat("d", 64)
digest := b.manifest(t, "mail", `{"module":"mail","version":"1","data":{"own":[{"id":"mail","class":"irreplaceable"}]}}`)
digest := b.manifest(t, "mail", `{"module":"mail","version":"1","resources":[{"id":"data","type":"directory","path":"/var/lib/mail"}],"data":{"own":[{"id":"mail","path":"${dir:data}","class":"irreplaceable","backup":"copy"}]}}`)
mod, _ := delivery.EncodeModule(delivery.Module{FP2: fNew, Manifest: digest, Repository: "novox/mail", Commit: strings.Repeat("1", 40), Path: delivery.RootPath})
b.putJSON(t, delivery.ModulesBucket, "mail", mod)
on, _ := delivery.EncodePresence(delivery.Presence{Online: true})