admin
ae9a1a69e2
test: 加 16 个回归测试 (11 纯函数 + 5 集成) + docs/TESTING.md
- 纯函数单测(go test -short)覆盖:
classification (levelIndex/maxLevel/materializeClassification/principalMaxIndex/deniedLevelsFor)、
display_name (propString/resolveDisplayName)、
governance (diffProps/mergeProps/parseStringArray/similarity)
- 集成测试(-tags=integration,跑真实 PG)覆盖 issue #4 #5 端到端:
enum_violation 拦截 + 友好错误;分级过滤 manager vs analyst(L0/L1) 越级 404;
properties.sensitivity 越级 redact 为 ***;删→恢复关系边 (links_snapshot+edges_created=1);
recompute dry_run 不落库 / apply=true 落库修正错误分级
- 集成测试踩坑:X-Principal 与 principal_clearances.principal 必须一致;每次新主体必须清
authzCache(sync.Map 进程级),否则历史空 Authz 会让分级过滤假阴性
- docs/TESTING.md:测试分层 / 跑测命令 / 编写新测试的约定
- CHANGELOG [1.2.0] 加 测试 与 文档 段落
2026-09-07 10:11:39 +08:00
..
2026-09-05 14:31:00 +08:00
2026-08-21 17:06:17 +08:00
2026-08-07 14:21:34 +08:00
2026-09-07 10:11:39 +08:00
2026-09-07 10:11:39 +08:00
2026-09-07 09:45:02 +08:00
2026-09-05 15:17:11 +08:00
2026-09-07 09:45:02 +08:00
2026-09-07 10:11:39 +08:00
2026-09-05 14:31:00 +08:00
2026-08-07 14:21:34 +08:00
2026-08-07 14:21:34 +08:00
2026-08-24 13:54:49 +08:00
2026-08-24 13:54:49 +08:00
2026-08-21 17:06:17 +08:00
2026-08-24 14:04:59 +08:00
2026-09-07 09:45:02 +08:00
2026-08-24 14:04:59 +08:00
2026-09-05 14:31:00 +08:00
2026-08-24 17:48:21 +08:00
2026-09-07 09:45:02 +08:00
2026-09-07 09:45:02 +08:00
2026-08-24 13:54:49 +08:00
2026-09-07 09:45:02 +08:00
2026-08-24 13:54:49 +08:00
2026-09-05 15:17:11 +08:00
2026-09-07 10:11:39 +08:00
2026-09-07 09:45:02 +08:00
2026-09-07 10:11:39 +08:00
2026-09-07 09:45:02 +08:00
2026-09-07 09:45:02 +08:00
2026-09-07 09:45:02 +08:00
2026-08-07 14:21:34 +08:00
2026-09-05 15:17:11 +08:00