修复HTTP验证测试并按实际签发配置复核项目权限

This commit is contained in:
xuans committed 2026-10-04 02:49:49 +08:00
1 parent 16224fa1f5
commit 201a272562
10 files changed
+221 -2

No files matched your search

@@ -3,6 +3,7 @@ package database
import (
"database/sql"
"fmt"
"strings"
"testing"
)
@@ -67,6 +68,10 @@ func snapshotSQLiteReplacementState(t *testing.T, db *sql.DB) map[string]sqliteH
result := snapshotSQLiteHistoricalBusiness(t, db)
for _, table := range []string{"projects", "domains", "servers"} {
query := "SELECT rowid, * FROM " + table + " ORDER BY id"
if table == "domains" {
// 固定迁移前已存在的列,新增字段不能被误判为历史数据遭到修改。
query = strings.Replace(result[table].query, "SELECT ", "SELECT rowid, ", 1)
}
if table == "servers" {
query = "SELECT rowid, id, name, address, port, username, host_key_fingerprint, certificate_path, private_key_path, certificate_chain_path, web_server, reload_command_json, created_at, updated_at, validation_command_json, password_ref, project_id, owner_id, created_by, updated_by FROM servers ORDER BY id"
}