返回 Skill 列表
extension
分类: 开发与工程无需 API Key

integration-testing-http

运行并扩展mjr.wtf的端到端HTTP集成测试(SQLite内存数据库),涵盖认证、创建/列出/删除、重定向和分析功能。在更改处理器、中间件或API合同时使用。

person作者: jakexiaohubgithub

Tooling assumptions

  • Use a terminal runner with bash and git available.
  • Prefer make targets when available; fall back to direct CLI commands when needed.

Run

make test-integration

Targeted runs:

go test -v -run TestE2E ./internal/infrastructure/http/server/
go test -v -run TestAPI ./internal/infrastructure/http/server/

What to update when adding/changing endpoints

  • Add/adjust OpenAPI (openapi.yaml) and validate it.
  • Update integration tests to assert:
    • status codes
    • auth requirements (missing/invalid token)
    • response JSON schema fields
    • redirect behavior and analytics side effects

Reference

See docs-site/src/content/docs/operations/integration-testing.md for the current suite structure and scenarios.