docs: 记录管理端系统管理实现与验证 (#67 #68 #69)

ila
2026-08-26 22:48:02 +08:00
parent a56ba63d79
commit e2281f6e17
+33
@@ -563,3 +563,36 @@ $env:NODE_OPTIONS = $null
#47、#52 和 #53 已由用户于 2026-08-25 明确验收通过;上述未执行项继续作为已知验证限制保留。
<!-- issue-47-integration:end -->
<!-- issues-67-69-system-verification:start -->
## 管理端系统管理回归
常规回归从仓库根目录执行:
```powershell
go test ./...
go vet ./...
go build ./...
go -C admin test ./...
go -C admin vet ./...
go -C admin build ./...
corepack pnpm --dir admin-ui lint
corepack pnpm --dir admin-ui test:unit -- --runInBand
$env:NODE_OPTIONS = "--max-old-space-size=4096"
corepack pnpm --dir admin-ui build:prod
$env:NODE_OPTIONS = $null
corepack pnpm --dir admin-ui exec playwright test tests/e2e/system-management.spec.ts --reporter=line
```
MySQL 保护与迁移测试只允许指向精确命名的可丢弃库 `chorus_test`:
```powershell
$env:CHORUS_MIGRATION_TEST_DATABASE = "chorus_test"
$env:CHORUS_RUN_MIGRATION_TESTS = "1"
go test -count=1 -run '^TestMigrationsUpDownUpMySQL$' ./migrations
$env:CHORUS_RUN_ADMIN_TESTS = "1"
go -C admin test -count=1 -run '^TestAdminProtectionMySQL$' ./app/admin/service
```
两项测试都会在连接后再次核对数据库名;迁移测试会重置目标库。浏览器测试使用合成导航、账号和空列表响应,不需要真实登录凭据,也不调用 Provider。
<!-- issues-67-69-system-verification:end -->