You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(test): consolidate testing infrastructure with Docker Compose (#41)
## Summary
Migrate from manual server setup to Docker Compose-based hermetic
testing.
Consolidate tests under test/ directory with consistent patterns.
Key changes:
- New test structure: test/e2e/,
test/integration/{gateway,orchestrator,extensions}/
- Container naming: sq-test-{context}-{unique-id} for parallel execution
- Shared utilities in test/testutil/ (compose, docker, mysql, schema
helpers)
- Removed old {service}/integration_test/ directories and speculator
service
- Documentation: TESTING.md → doc/howto/, STRUCTURE.md →
PROJECT_STRUCTURE.md
- Makefile: alphabetical targets, new integration test targets,
local-start/stop naming
- Consolidate CI and create separate jobs for faster run and add bazel
cache
## Test Plan
- Unit Tested
- Integration Tested
- CI Validation
<img width="586" height="543" alt="Screenshot 2026-02-22 at 7 45 39 PM"
src="https://github.com/user-attachments/assets/939c5e08-23d1-4e99-bd84-bd34f0a21309"
/>
This convention makes the Makefile self-documenting and enables powerful shell completion.
206
+
199
207
### Common Make Targets
200
208
201
209
```bash
202
210
make build # Build all services
203
211
make proto # Regenerate proto files
204
212
make test # Run unit tests
205
-
make integration-test # Run service integration tests
206
-
make e2e-test # Run hermetic tests with Testcontainers
207
-
make run-gateway # Run gateway (port 8081)
208
-
make run-orchestrator # Run orchestrator (port 8082)
209
-
make run-speculator # Run speculator (port 8083)
210
-
make run-client-gateway # Run gateway client
213
+
make integration-test # Run all integration tests (Docker-based)
214
+
make integration-test-gateway # Test Gateway service
215
+
make e2e-test # Run end-to-end tests
216
+
make local-start # Start full stack with Docker Compose
217
+
make local-ps # Show running containers and ports
218
+
make local-logs # View logs from all services
219
+
make local-stop # Stop all services
220
+
make run-client-gateway # Test Gateway client (SERVER_ADDR, MESSAGE)
221
+
make run-client-orchestrator # Test Orchestrator client
211
222
make gazelle # Update BUILD.bazel files
212
-
make clean #Remove binaries and Bazel cache
223
+
make clean #Clean Bazel cache
213
224
make clean-proto # Remove generated proto files
214
225
```
215
226
@@ -241,6 +252,23 @@ make clean-proto # Remove generated proto files
241
252
2.**Avoid blocking operations for synchronization** — do not use `time.Sleep`. Design the tested routine to signal back (channels, callbacks, condition variables).
242
253
3.**Use testify assertions** — use `stretchr/assert` or `require` instead of `t.Fatal()`.
243
254
255
+
**Integration Test Conventions:**
256
+
257
+
1.**Package naming** — use folder name as package name (NOT `*_test` suffix):
0 commit comments