From 156e51d1609924a2059d3a90b69fb0d36a512413 Mon Sep 17 00:00:00 2001 From: Justin Bandoro <79104794+jbandoro@users.noreply.github.com> Date: Thu, 2 Nov 2023 04:04:30 -0700 Subject: [PATCH] Update contributing docs for running integration tests (#638) To run the integration tests locally without errors, developers have to set more environment variables than the ones that are currently in the docs. If these were excluded, they would get errors like: ```shell tests/test_example_dags_no_connections.py:59: in @pytest.mark.parametrize("dag_id", get_dag_ids()) tests/test_example_dags_no_connections.py:54: in get_dag_ids dag_bag = get_dag_bag() tests/test_example_dags_no_connections.py:49: in get_dag_bag assert not db.import_errors E AssertionError: assert not {'/Users/justin.bandoro/astronomer-cosmos/dev/dags/example_cosmos_python_models.py': 'Traceback (most recent call last...ema.yml from project jaffle_shop: Parsing Error\n Env var required but not provided: \'DATABRICKS_CLUSTER_ID\'\n\n'} E + where {'/Users/justin.bandoro/astronomer-cosmos/dev/dags/example_cosmos_python_models.py': 'Traceback (most recent call last...ema.yml from project jaffle_shop: Parsing Error\n Env var required but not provided: \'DATABRICKS_CLUSTER_ID\'\n\n'} = .import_errors ``` --- docs/contributing.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/contributing.rst b/docs/contributing.rst index af4ffe585..f87553883 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -111,6 +111,16 @@ To run the integration tests for the first time, use: export AIRFLOW_HOME=`pwd` export AIRFLOW_CONN_AIRFLOW_DB=postgres://postgres:postgres@0.0.0.0:5432/postgres + export DATABRICKS_HOST='' + export DATABRICKS_TOKEN='' + export DATABRICKS_WAREHOUSE_ID='' + export DATABRICKS_CLUSTER_ID='' + export POSTGRES_PORT=5432 + export POSTGRES_SCHEMA=public + export POSTGRES_DB=postgres + export POSTGRES_PASSWORD=postgres + export POSTGRES_USER=postgres + export POSTGRES_HOST=localhost hatch run tests.py3.8-2.5:test-integration-setup hatch run tests.py3.8-2.5:test-integration