Files
diary-news/scripts
xiaji f5fcde1153 test(ingest): 端到端 smoke 脚本
scripts/smoke_ingest.py — 验证 /api/v1/ingest 完整链路,6 步:
  1) 新建 → 201 created
  2) external_id 重复 → 200 duplicate reason=external_id_match
  3) 不带 external_id 新建 → 201 created
  4) 内容指纹重复 → 200 duplicate reason=content_hash_match
  5) 错误 token → 401
  6) body 超 5000 字 → 400 / 422

用法:python scripts/smoke_ingest.py --token <RAW_TOKEN>
默认 host=207.57.129.228 port=19717(直连服务器),
生产走 caddy 时:--scheme https --host your-domain --port 443

需要 owner 在 web 端生成 ingest token(API Push 源的 🔑 Token 按钮)。

smoke 数据会留在 Feed 里(source_ref='smoke', tags 含 'smoke'),
如果想清理:DELETE FROM articles WHERE source_ref='smoke';
或用 source_ref 过滤后手动删。
2026-06-14 20:30:35 +08:00
..
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00
2026-06-11 17:24:46 +08:00