refactor(db): 清理遗留死代码并对齐文档与测试

删除 dbv2 从未挂载的 log_module.py(Flask /log/* 遗留)与纯 TCP 服务
用不到的 security_middleware.py 副本;db/README.md 按 pymsg 实现重写,
requirements 去掉 flask/waitress;黑盒测试对 pymsg 服务改用 TCP 探测,
修复 check_service HTTP 探测导致的 db 测试整体假 skip。
This commit is contained in:
qing committed 2026-07-28 22:21:36 +08:00
1 parent dabd892601
commit 6692c9c4ee
9 files changed
+130 -818

No files matched your search

+6 -2
View File
@@ -17,7 +17,7 @@ import sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from config import SERVICES, PORT_MAP, detect_service, get_url
from helpers import check_service
from helpers import check_service, check_tcp_service
TEST_MODULES = {
"gateway": "test_gateway",
@@ -53,7 +53,11 @@ def run_service_test(name: str, url: str) -> tuple:
print(f" {svc['description']} ({url})")
print(f"{'='*60}")
reachable, detail = check_service(url)
# pymsg/TCP 服务无 HTTP 接口,用 TCP 直连探测
if svc.get("protocol") == "pymsg":
reachable, detail = check_tcp_service(svc["host"], svc["port"])
else:
reachable, detail = check_service(url)
if not reachable:
print(f" [WARN] 服务不可达: {url}")
if detail: