diff --git a/Makefile b/Makefile index 9c32853..4c4dd27 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/tests/e2e/docker-compose.logs-debug.yml b/tests/e2e/docker-compose.logs-debug.yml index e5c8dc4..b9d94a6 100644 --- a/tests/e2e/docker-compose.logs-debug.yml +++ b/tests/e2e/docker-compose.logs-debug.yml @@ -6,7 +6,7 @@ services: redis: image: redis:7-alpine ports: - - "6380:6379" + - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s