修复前后端逻辑并完善多数据库测试
统一仪表盘、AI 回复、卡密、扫码和通知等前后端行为,补齐并发与失败恢复测试。新增 MySQL 8.4、PostgreSQL 17 持久化 Docker 功能测试和 SQLite 脱敏播种工具。
This commit is contained in:
1 parent
45f895d0c4
commit
2f20a54f30
79 files changed
+2684
-2598
No files matched your search
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
test_instance() {
|
||||
name="$1"
|
||||
base_url="$2"
|
||||
cookie_file="/tmp/${name}.cookies"
|
||||
|
||||
curl -fsS "${base_url}/health" | grep -q '"status":"ok"'
|
||||
curl -fsS -c "$cookie_file" -H 'Content-Type: application/json' \
|
||||
-d '{"username":"docker_fixture","password":"docker_fixture_password"}' \
|
||||
"${base_url}/login" | grep -q '"success":true'
|
||||
curl -fsS -b "$cookie_file" "${base_url}/dashboard/stats" | grep -q '"total_cookies":1'
|
||||
curl -fsS -b "$cookie_file" "${base_url}/analytics/orders" | grep -q '"revenue_stats"'
|
||||
curl -fsS -b "$cookie_file" "${base_url}/cards" | grep -q '\[Docker测试\]'
|
||||
|
||||
admin_status="$(curl -sS -o /tmp/${name}-admin.json -w '%{http_code}' -b "$cookie_file" "${base_url}/admin/stats")"
|
||||
test "$admin_status" = "403"
|
||||
printf '%s functional test passed\n' "$name"
|
||||
}
|
||||
|
||||
test_instance mysql http://app-mysql:8080
|
||||
test_instance postgres http://app-postgres:8080
|
||||
Reference in new issue
Block a user