Add backup dashboard and appearance settings

This commit is contained in:
maxim
2026-07-31 21:12:22 +03:00
parent 584ff7e8ee
commit 030e1fdc7f
4 changed files with 187 additions and 16 deletions

15
backups_test.go Normal file
View File

@@ -0,0 +1,15 @@
package main
import "testing"
func TestLatestBackups(t *testing.T) {
items := []BackupItem{
{VMID: 100, CreatedAt: 10, Storage: "old"},
{VMID: 100, CreatedAt: 20, Storage: "new"},
{VMID: 101, CreatedAt: 15, Storage: "only"},
}
latest := latestBackups(items)
if len(latest) != 2 || latest[0].Storage != "new" {
t.Fatalf("неожиданный список последних копий: %+v", latest)
}
}