一键导入
integration-test
Run integration tests that require Docker (Postgres, MinIO via testcontainers). Use to validate database and storage behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run integration tests that require Docker (Postgres, MinIO via testcontainers). Use to validate database and storage behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run Go benchmarks and compare results to detect performance regressions. Use before and after performance-related changes.
Run pre-push quality checks (vet + lint + tests with race detector). Use before pushing code.
Run tests with coverage analysis and identify untested code paths. Use to find gaps before releases.
Check and tidy Go module dependencies. Use after adding/removing imports or before releases.
Run go generate to build templ templates and frontend assets. Use after changing templates or CSS/JS.
Run golangci-lint and static analysis on Go code. Use before pushing or to check code quality.
| name | integration-test |
| description | Run integration tests that require Docker (Postgres, MinIO via testcontainers). Use to validate database and storage behavior. |
| disable-model-invocation | true |
| argument-hint | package-path |
Run integration tests that use testcontainers-go for Postgres and MinIO.
/integration-test - Run all integration tests/integration-test ./internal/repo/... - Run integration tests in a specific packagedocker info should succeed)Verify Docker is available
docker info > /dev/null 2>&1 && echo "Docker OK" || echo "Docker not available"
If Docker is not available, inform the user and stop.
Run integration tests
For a specific package:
go test -tags integration -v -timeout 10m $ARGUMENTS 2>&1
For all packages:
go test -tags integration -v -timeout 10m ./... 2>&1
Parse results
Report:
## Integration Test Results
### Passed
- [list of passed tests]
### Failed
- [list of failed tests with error details]
### Summary
- Total: N | Passed: N | Failed: N
- Duration: Ns
On failure, read the failing test files to understand what's being tested and suggest fixes.
Integration tests use the //go:build integration build tag and live alongside unit tests:
| File | Container | Purpose |
|---|---|---|
internal/testutil/postgres.go | PostgreSQL | Database integration tests |
internal/testutil/minio.go | MinIO | S3-compatible storage tests |
docker ps --filter "label=org.testcontainers"