feat(tests): add PostgreSQL readiness check in test setup
Integration Tests / integration-test (push) Failing after 1m10s

This commit is contained in:
2026-09-18 20:23:56 +02:00
parent 4f45e4c9a6
commit cca4e1a0ef
2 changed files with 27 additions and 0 deletions
+10
View File
@@ -80,6 +80,16 @@ test-setup: build ## Start test environment (docker-compose/podman-compose)
exit 1; \
fi
@$(COMPOSE_CMD) -f tests/docker-compose.yml up -d
@echo "Waiting for PostgreSQL to be ready..."
@for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do \
if $(COMPOSE_CMD) -f tests/docker-compose.yml exec -T postgres pg_isready -U user > /dev/null 2>&1; then \
echo "PostgreSQL is ready"; exit 0; \
fi; \
sleep 2; \
done; \
echo "ERROR: PostgreSQL did not become ready in time"; \
$(COMPOSE_CMD) -f tests/docker-compose.yml logs postgres; \
exit 1
test-teardown: ## Stop test environment (docker-compose/podman-compose)
@echo "Stopping test environment (using $(COMPOSE_CMD))..."