@@ -20,21 +20,21 @@ End-to-end integration tests for the httpSMS API. These tests validate the compl
2020 └──────────────┘
2121 │
2222 ┌──────┴───────┐
23- │ PostgreSQL │ │ Redis │
24- │ Port 5435 │ │ Port 6379 │
23+ │ CockroachDB │ │ Redis │
24+ │ Port 26257 │ │ Port 6379 │
2525 └──────────────┘ └─────────────┘
2626```
2727
2828### Components
2929
30- | Component | Description |
31- | --------------- | ------------------------------------------------------- |
32- | ** API** | The httpSMS Go API server running in Docker |
33- | ** Emulator** | A Fiber v3 Go service that simulates an Android phone |
34- | ** PostgreSQL ** | Database for the API |
35- | ** Redis** | Cache and queue backend |
36- | ** Seed** | One-shot container that seeds test data into PostgreSQL |
37- | ** Test Runner** | Go test binary that runs on the host machine |
30+ | Component | Description |
31+ | --------------- | -------------------------------------------------------- |
32+ | ** API** | The httpSMS Go API server running in Docker |
33+ | ** Emulator** | A Fiber v3 Go service that simulates an Android phone |
34+ | ** CockroachDB ** | Database for the API (single-node, insecure mode) |
35+ | ** Redis** | Cache and queue backend |
36+ | ** Seed** | One-shot container that seeds test data into CockroachDB |
37+ | ** Test Runner** | Go test binary that runs on the host machine |
3838
3939### How It Works
4040
@@ -86,7 +86,7 @@ export FIREBASE_CREDENTIALS=$(jq -c . firebase-credentials.json)
8686docker compose up -d --build --wait
8787```
8888
89- This starts PostgreSQL , Redis, the API, and the emulator. The ` --wait ` flag blocks until all health checks pass.
89+ This starts CockroachDB , Redis, the API, and the emulator. The ` --wait ` flag blocks until all health checks pass.
9090
9191### 4. Wait for Seeding
9292
@@ -95,7 +95,7 @@ docker compose wait seed
9595sleep 2
9696```
9797
98- The seed container inserts test users, phones, and API keys into PostgreSQL after the API has run its GORM migrations.
98+ The seed container inserts test users, phones, and API keys into CockroachDB after the API has run its GORM migrations.
9999
100100### 5. Run Tests
101101
@@ -181,7 +181,7 @@ docker compose logs api
181181Common issues:
182182
183183- ` FIREBASE_CREDENTIALS ` env var not set or malformed
184- - PostgreSQL not ready (increase ` start_period ` in healthcheck)
184+ - CockroachDB not ready (increase ` start_period ` in healthcheck)
185185
186186### Tests timeout waiting for ` delivered ` status
187187
0 commit comments