fix: 修复写队列 busy 恢复、关闭安全、备份与配置构建问题

This commit is contained in:
Nixevol
2026-09-30 16:21:05 +08:00
parent 4059a1576b
commit 57c2f70678
23 changed files with 825 additions and 101 deletions
+4 -3
View File
@@ -5,7 +5,6 @@ import (
"database/sql"
"os"
"path/filepath"
"strings"
"testing"
"time"
)
@@ -94,8 +93,10 @@ CREATE TABLE schema_migrations (
t.Fatalf("backup dir missing: %v", err)
}
found := false
var names []string
for _, e := range entries {
if strings.HasPrefix(e.Name(), "pre-migrate-") && strings.HasSuffix(e.Name(), ".db") {
names = append(names, e.Name())
if e.Name() == "pre-migrate-v1-to-v2.db" {
found = true
info, statErr := e.Info()
if statErr != nil {
@@ -107,7 +108,7 @@ CREATE TABLE schema_migrations (
}
}
if !found {
t.Fatal("expected pre-migrate-*.db backup")
t.Fatalf("expected pre-migrate-v1-to-v2.db, got %v", names)
}
}