fix: 修复写队列 busy 恢复、关闭安全、备份与配置构建问题
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user