test: add justfile commands for running integration tests with podman
Build / build (push) Successful in 43s
Build / build (push) Successful in 43s
This commit is contained in:
@@ -99,6 +99,25 @@ podman-run:
|
||||
podman-down:
|
||||
@podman-compose down
|
||||
|
||||
# Run integration tests with podman
|
||||
# Starts a test PostgreSQL container, runs tests, then cleans up
|
||||
test-integration:
|
||||
@echo "Starting test database container..."
|
||||
@podman-compose -f compose.test.yaml up -d
|
||||
@sleep 10
|
||||
@echo "Running integration tests..."
|
||||
@. .env.test && go test -v -timeout 30m ./...
|
||||
|
||||
# Alternative: Run integration tests using testcontainers with podman provider
|
||||
test-integration-tc:
|
||||
@echo "Running integration tests with testcontainers (podman provider)..."
|
||||
@TESTCONTAINERS_PROVIDER=podman go test -v -timeout 30m .
|
||||
|
||||
# Stop and remove test database container
|
||||
test-integration-down:
|
||||
@echo "Stopping test database container..."
|
||||
@podman-compose -f compose.test.yaml down -v
|
||||
|
||||
# Create DB container
|
||||
docker-run:
|
||||
@if docker compose up --build 2>/dev/null; then \
|
||||
|
||||
Reference in New Issue
Block a user