D47 follow-up (found live on 9202): the kept-copies list („Megőrzött másolatok”) shows on a box without off-site too — it sat only inside the off-site card, so 9202 never listed a set-aside unit or a D25 copy; one named template, two call sites, parity fixtures unchanged. Red-proved. Commit only.
gates / gates (push) Successful in 1m26s
gates / gates (push) Successful in 1m26s
This commit is contained in:
@@ -163,3 +163,22 @@ func TestD47_KeptUnitRestoreHandlerRefusals(t *testing.T) {
|
||||
t.Fatal("a refusal must start nothing")
|
||||
}
|
||||
}
|
||||
|
||||
// D25 + D47 (2026-10-25, found live on 9202): a box WITHOUT off-site lists its kept copies too. Before, the section sat
|
||||
// only inside the off-site card, so 9202 (no off-site) never showed a set-aside unit or a kept second-drive copy.
|
||||
func TestD47_KeptCopiesAreListedWithoutOffsite(t *testing.T) {
|
||||
d := i18nLayoutData("backups-restore", "Visszaállítás a mentésből")
|
||||
d["Backup"] = i18nBackupStatus(false, false)
|
||||
d["OffboxConfigured"] = false
|
||||
d["KeptCopies"] = []keptCopyRow{{ID: "aaaaaaaaaaaaaaaa", Source: "tandoor", Line: "belso", SizeHuman: "150 MB", Since: "2026-10-25T08:00:00Z", Restorable: true}}
|
||||
d["KeptUnitRestorable"] = true
|
||||
html := renderBackupPage(t, "backups_restore", d)
|
||||
if strings.Count(html, "Megőrzött másolatok") != 1 || strings.Count(html, `action="/backup/kept/restore"`) != 1 {
|
||||
t.Fatal("a box without off-site must list its kept copies once, with the restore")
|
||||
}
|
||||
d["OffboxConfigured"] = true
|
||||
d["OffsiteStoreState"] = "known"
|
||||
if html := renderBackupPage(t, "backups_restore", d); strings.Count(html, "Megőrzött másolatok") != 1 {
|
||||
t.Fatal("with off-site the section is shown once (inside the off-site card), never twice")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user