hyperdx/scripts
Warren Lee 56e60ef8c8
[HDX-3796] Isolate E2E test environment with slot-based port assignment (#1983)
## Summary

- Adds worktree-aware port isolation for E2E tests, mirroring the existing `dev-int` slot mechanism so multiple agents/developers can run E2E tests in parallel without port conflicts
- Fixes the navigation E2E test that was broken by Live Tail URL updates swallowing client-side navigation
- Adds `dev-e2e` Makefile target for running specific tests with `FILE=` and `GREP=` filters, plus `REPORT=1` to open the HTML report after tests finish

## Port Isolation

Each worktree gets a deterministic slot (0–99) computed from its directory name. All E2E service ports are offset by that slot in the **44000–50100** range, avoiding collisions with `dev` (4317–27017) and `dev-int` (14320–40098).

| Service | Base + slot | Variable |
|---|---|---|
| ClickHouse HTTP | 48123 + slot | `HDX_E2E_CH_PORT` |
| ClickHouse Native | 49000 + slot | `HDX_E2E_CH_NATIVE_PORT` |
| MongoDB | 49998 + slot | `HDX_E2E_MONGO_PORT` |
| API server | 49100 + slot | `HDX_E2E_API_PORT` |
| App (fullstack) | 48081 + slot | `HDX_E2E_APP_PORT` |
| App (local) | 48001 + slot | `HDX_E2E_APP_LOCAL_PORT` |
| OpAMP | 44320 + slot | `HDX_E2E_OPAMP_PORT` |

## New Make Targets

```bash
make dev-e2e FILE=navigation                    # Run specific test file
make dev-e2e FILE=navigation GREP="help menu"   # Filter by test name
make dev-e2e GREP="should navigate"             # Grep across all files
make dev-e2e FILE=navigation REPORT=1           # Open HTML report after run
make dev-e2e-clean                              # Remove test artifacts
```

## Linear

https://linear.app/hyperdx/issue/HDX-3796
2026-03-26 18:19:14 +00:00
..
test-e2e-ci.sh chore: update e2e test configs to better work with CI (#1458) 2025-12-10 20:13:00 +00:00
test-e2e.sh [HDX-3796] Isolate E2E test environment with slot-based port assignment (#1983) 2026-03-26 18:19:14 +00:00