metadata-ingestion-modules/airflow-plugin/README.docker.md
Docker-based test environment for the Airflow plugin. The supported tox envs are
py311-airflow30, py311-airflow31, and py311-airflow32 (Airflow 2.x is no
longer supported); the default is py311-airflow31.
Dockerfile.test — Docker image that runs tests via toxdocker-compose.test.yml — Docker Compose config with automatic volume mountsrun-tests.sh — Wrapper script for the easiest test experienceDOCKER_TEST_GUIDE.md — Full documentation with examples# Run all tests
./run-tests.sh
# Run a specific test
./run-tests.sh py311-airflow31 -- tests/integration/test_plugin.py::test_airflow_plugin -v
# Update golden files (saved back to your local filesystem)
./run-tests.sh py311-airflow31 -- --update-golden-files
docker compose -f docker-compose.test.yml run --rm airflow-plugin-test
Both the wrapper script and Docker Compose mount:
metadata-ingestion and airflow-plugin)tests/integration/goldens).tox, Docker Compose only)Golden files get updated on your local filesystem; source changes are visible to the container immediately.
The image defaults to tox -e py311-airflow31, but you can pass any supported
env (py311-airflow30 / py311-airflow31 / py311-airflow32) as the first
argument. Each env installs the matching apache-airflow~=3.x line and the
providers/constraint file pinned in tox.ini.
| Use Case | Recommended Approach |
|---|---|
| Local development | Local tox (faster iteration) |
| CI/CD pipelines | Docker (complete isolation) |
| Cross-platform testing | Docker (consistent environment) |
See DOCKER_TEST_GUIDE.md for advanced usage, CI/CD examples, and
troubleshooting.