Commit Graph

4 Commits

Author SHA1 Message Date
Prateek c9eac34e21 fix: use isolated ports (5000/5001/5003) for integration tests
Prevents port conflicts with:
- Current orchestrator (ports 3000/3001/3003)
- Future orchestrator (ports 4000/4001/4003)

Changes:
- docker-compose.yml: Map ports 5000, 5001, 5003
- onboarding-test.sh: Configure port 5000, check 5003 for WebSocket
- All health checks updated to use new ports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 03:27:21 +05:30
Prateek 4f19e9299e fix: configure npm user-local prefix for testuser (no sudo needed) 2026-02-18 03:27:16 +05:30
Prateek 105f26253e fix: strengthen integration test to catch WebSocket bug
**Problem:**
- Test only warned about missing WebSocket servers (didn't fail)
- Wouldn't have caught the bug your friend encountered

**Solution:**
1. Make WebSocket server check mandatory (fail if not responding)
2. Add retry logic (wait up to 10s for servers to start)
3. Add end-to-end test: verify orchestrator terminal page loads

**Now catches:**
 Config discovery bug (API endpoint fails if config not loaded)
 WebSocket server bug (test fails if servers not started)
 Terminal page bug (test fails if session page doesn't load)

All bugs from your friend's experience are now covered!

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 03:27:12 +05:30
Prateek 2d89f8500a feat: add Docker-based onboarding integration test
Creates comprehensive integration test that simulates fresh developer onboarding:

**Test Flow:**
1. Fresh Ubuntu + Node 20 environment (Docker)
2. Run `./scripts/setup.sh` (install + build + npm link)
3. Create test config with `ao init`
4. Start dashboard with `ao start`
5. Verify dashboard API responds
6. Verify WebSocket servers running
7. Measure total onboarding time

**Usage:**
```bash
# Run locally
cd tests/integration && ./run-test.sh

# Or with docker-compose
cd tests/integration && docker-compose up --build
```

**CI Integration:**
- Runs on PR (when packages/ or scripts/ change)
- Runs on push to main
- Uploads logs on failure
- Measures onboarding time

**Benefits:**
- Catches onboarding regressions (like config discovery bug)
- Benchmarks onboarding performance
- Validates fresh install experience
- Tests actual user workflow end-to-end

**Future Enhancements:**
- Multi-project test
- Port conflict test
- Session spawn test
- Terminal WebSocket test
- Upgrade test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 03:27:07 +05:30