Files
drive/dev/docs/integration-tests.md

22 lines
688 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Integration tests (Go + testcontainers)
## Requirements
- A working Docker daemon reachable from the devcontainer.
- Recommended: `.devcontainer/devcontainer.json` includes `docker-outside-of-docker`, which uses the host/Codespaces Docker.
- Alternative: switch to `docker-in-docker` if you dont have host Docker access.
## Run
From `apps/backend`:
```bash
go test -tags=integration ./internal/drexa -run TestRegistrationFlow -count=1
```
Notes:
- The first run pulls `postgres:16-alpine` (needs network access).
- Tests are tagged `integration` so they never run in normal `go test ./...` by accident.
- If Docker isnt available, the test skips (rather than failing).