mirror of
https://github.com/juanfont/headscale.git
synced 2026-01-23 02:24:10 +00:00
docs: update integration testing docs for concurrent execution
Some checks are pending
Build / build-nix (push) Waiting to run
Build / build-cross (GOARCH=amd64 GOOS=darwin) (push) Waiting to run
Build / build-cross (GOARCH=amd64 GOOS=linux) (push) Waiting to run
Build / build-cross (GOARCH=arm64 GOOS=darwin) (push) Waiting to run
Build / build-cross (GOARCH=arm64 GOOS=linux) (push) Waiting to run
Check Generated Files / check-generated (push) Waiting to run
NixOS Module Tests / nix-module-check (push) Waiting to run
Tests / test (push) Waiting to run
Some checks are pending
Build / build-nix (push) Waiting to run
Build / build-cross (GOARCH=amd64 GOOS=darwin) (push) Waiting to run
Build / build-cross (GOARCH=amd64 GOOS=linux) (push) Waiting to run
Build / build-cross (GOARCH=arm64 GOOS=darwin) (push) Waiting to run
Build / build-cross (GOARCH=arm64 GOOS=linux) (push) Waiting to run
Check Generated Files / check-generated (push) Waiting to run
NixOS Module Tests / nix-module-check (push) Waiting to run
Tests / test (push) Waiting to run
Update documentation to reflect the new concurrent test execution capabilities and add guidance on run ID isolation. AGENTS.md: - Add examples for running multiple tests concurrently - Document run ID format and container naming conventions - Update "Critical Notes" to explain isolation mechanisms .claude/agents/headscale-integration-tester.md: - Add "Concurrent Execution and Run ID Isolation" section - Document forbidden and safe operations for cleanup - Add "Agent Session Isolation Rules" for multi-agent environments - Add 6th core responsibility about concurrent execution awareness - Add ISOLATION PRINCIPLE to critical principles - Update pre-test cleanup documentation
This commit is contained in:
parent
0bcfdc29ad
commit
d227b3a135
2 changed files with 135 additions and 12 deletions
20
AGENTS.md
20
AGENTS.md
|
|
@ -405,13 +405,29 @@ go run ./cmd/hi run "TestName" --postgres
|
|||
|
||||
# Pattern matching for related tests
|
||||
go run ./cmd/hi run "TestPattern*"
|
||||
|
||||
# Run multiple tests concurrently (each gets isolated run ID)
|
||||
go run ./cmd/hi run "TestPingAllByIP" &
|
||||
go run ./cmd/hi run "TestACLAllowUserDst" &
|
||||
go run ./cmd/hi run "TestOIDCAuthenticationPingAll" &
|
||||
```
|
||||
|
||||
**Concurrent Execution Support**:
|
||||
|
||||
The test runner supports running multiple tests concurrently on the same Docker daemon:
|
||||
|
||||
- Each test run gets a **unique Run ID** (format: `YYYYMMDD-HHMMSS-{6-char-hash}`)
|
||||
- All containers are labeled with `hi.run-id` for isolation
|
||||
- Container names include the run ID for easy identification (e.g., `ts-{runID}-1-74-{hash}`)
|
||||
- Dynamic port allocation prevents port conflicts between concurrent runs
|
||||
- Cleanup only affects containers belonging to the specific run ID
|
||||
- Log directories are isolated per run: `control_logs/{runID}/`
|
||||
|
||||
**Critical Notes**:
|
||||
|
||||
- Only ONE test can run at a time (Docker port conflicts)
|
||||
- Tests generate ~100MB of logs per run in `control_logs/`
|
||||
- Clean environment before each test: `sudo rm -rf control_logs/202* && docker system prune -f`
|
||||
- Running many tests concurrently may cause resource contention (CPU/memory)
|
||||
- Clean stale containers periodically: `docker system prune -f`
|
||||
|
||||
### Test Artifacts Location
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue