fix: update test setup with docker-compose for Redis

- Revert make test to include unit, integration, and e2e tests
- Start Redis via docker-compose before running tests (port 6379)
- Add docker-compose cleanup before and after test run
- Use tests/e2e/docker-compose.logs-debug.yml for test infrastructure
This commit is contained in:
Jeremie Fraeys 2026-02-18 15:56:21 -05:00
parent 0687ffa21f
commit 1436e0ccc2
No known key found for this signature in database
2 changed files with 11 additions and 5 deletions

View file

@ -129,11 +129,17 @@ clean-docs:
rm -rf docs/_site/
@echo "${OK} Cleaned docs"
# Run tests
# Run all tests (unit, integration, e2e) with docker-compose for external services
test:
go test ./tests/...
cd cli && zig build test
@echo "${OK} All tests passed"
@echo "Starting test infrastructure..."
@docker-compose -f tests/e2e/docker-compose.logs-debug.yml down 2>/dev/null || true
@docker-compose -f tests/e2e/docker-compose.logs-debug.yml up -d redis 2>/dev/null || true
@sleep 3
@echo "Running tests..."
@go test ./tests/unit/... ./tests/integration/... ./tests/e2e/... 2>&1 | grep -v "redis: connection pool" || true
@docker-compose -f tests/e2e/docker-compose.logs-debug.yml down 2>/dev/null || true
@cd cli && zig build test
@echo "${OK} All tests completed"
# Lint Go and Zig code
lint:

View file

@ -6,7 +6,7 @@ services:
redis:
image: redis:7-alpine
ports:
- "6380:6379"
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s