integration-testing-http
Run and extend the end-to-end HTTP integration tests (SQLite in-memory) for mjr.wtf, covering auth, create/list/delete, redirects, and analytics. Use when changing handlers, middleware, or API contracts.
When & Why to Use This Skill
This Claude skill automates the execution and extension of end-to-end HTTP integration tests for Go-based web applications. It ensures API reliability by validating authentication, CRUD operations, redirects, and analytics using an in-memory SQLite database, making it essential for maintaining robust API contracts and preventing regressions during development.
Use Cases
- Refactoring API Handlers: Automatically verify that changes to backend logic do not break existing HTTP endpoints or response structures.
- Middleware Security Updates: Ensure that authentication and authorization layers correctly permit or block requests after modifying security middleware.
- API Contract Compliance: Validate that response JSON schemas and status codes strictly adhere to defined OpenAPI specifications during the development lifecycle.
- Regression Testing: Run a comprehensive suite of integration tests to catch bugs in redirects or analytics tracking before deploying new features.
| name | integration-testing-http |
|---|---|
| description | Run and extend the end-to-end HTTP integration tests (SQLite in-memory) for mjr.wtf, covering auth, create/list/delete, redirects, and analytics. Use when changing handlers, middleware, or API contracts. |
| license | MIT |
| compatibility | Requires Go, make, and generated code. |
| repo | mjrwtf |
| runner | github-copilot-cli |
| version | 1.1 |
| allowed-tools | Bash(git:*) Bash(make:*) Bash(go:*) Read |
Tooling assumptions
- Use a terminal runner with bash and git available.
- Prefer
maketargets 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.