From 299c3fdf503517f1bfd4b57db469e246d262aa8d Mon Sep 17 00:00:00 2001 From: frankzfli Date: Sat, 10 May 2025 14:59:04 +0800 Subject: [PATCH] Build: Decouple setup and exec in integration tests --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 62c0425013..cd6056b027 100644 --- a/Makefile +++ b/Makefile @@ -52,13 +52,17 @@ test-s3: # Run tests marked with s3, can add arguments with PYTEST_ARGS="-vv" sh ./dev/run-minio.sh poetry run pytest tests/ -m s3 ${PYTEST_ARGS} -test-integration: ## Run all integration tests, can add arguments with PYTEST_ARGS="-vv" +test-integration: | test-integration-setup test-integration-exec ## Run all integration tests, can add arguments with PYTEST_ARGS="-vv" + +test-integration-setup: # Prepare the environment for integration docker compose -f dev/docker-compose-integration.yml kill docker compose -f dev/docker-compose-integration.yml rm -f docker compose -f dev/docker-compose-integration.yml up -d sleep 10 docker compose -f dev/docker-compose-integration.yml cp ./dev/provision.py spark-iceberg:/opt/spark/provision.py docker compose -f dev/docker-compose-integration.yml exec -T spark-iceberg ipython ./provision.py + +test-integration-exec: # Execute integration tests, can add arguments with PYTEST_ARGS="-vv" poetry run pytest tests/ -v -m integration ${PYTEST_ARGS} test-integration-rebuild: