feat(backups): 主人和管理员可下载单个备份、导出停服世界,字节经一次性票据从导出 Job 流式转给浏览器,备份按 sha256 核对

This commit is contained in:
Lemon-miaow committed 2026-09-28 00:58:42 +08:00
1 parent 34b81ee8fe
commit 5dffadb40d
35 files changed
+4018 -70

No files matched your search

+2 -2
View File
@@ -344,8 +344,8 @@ func TestBackupReadBack(t *testing.T) {
if b, err := repo.BackupByID(ctx, newer); err != nil || !b.Corrupt {
t.Fatalf("BackupByID(corrupt) = (%+v, %v); want Corrupt", b, err)
}
if b, err := repo.BackupByID(ctx, older); err != nil || b.Corrupt {
t.Fatalf("BackupByID(intact) = (%+v, %v); want not Corrupt", b, err)
if b, err := repo.BackupByID(ctx, older); err != nil || b.Corrupt || b.SHA256 != "aa" {
t.Fatalf("BackupByID(intact) = (%+v, %v); want not Corrupt, sha256 aa", b, err)
}
views, _, err := repo.AllBackups(ctx, api.BackupListOpts{Server: name, Limit: api.MaxBackupListLimit})