Skip to content

Commit

Permalink
fix tests?
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 committed Dec 2, 2022
1 parent f1a2621 commit a68fb00
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,9 @@ def get_long_description():

dev_requirements = {
*base_dev_requirements,
# Extra requirements for Airflow.
"apache-airflow[snowflake]>=2.0.2", # snowflake is used in example dags
"snowflake-sqlalchemy<=1.2.4", # make constraint consistent with extras
"virtualenv", # needed by PythonVirtualenvOperator
}

full_test_dev_requirements = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file uses a connection hook, which fails to load unless configured.
snowflake_sample_dag.py
5 changes: 2 additions & 3 deletions metadata-ingestion/tests/unit/test_airflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,12 @@ def test_dags_load_with_no_errors(pytestconfig: pytest.Config) -> None:
pytestconfig.rootpath / "src/datahub_provider/example_dags"
)

# Note: the .airflowignore file skips the snowflake DAG.
dag_bag = DagBag(dag_folder=str(airflow_examples_folder), include_examples=False)

import_errors = dag_bag.import_errors

assert len(import_errors) == 1
assert "snowflake_sample_dag" in list(import_errors.keys())[0]

assert len(import_errors) == 0
assert dag_bag.size() > 0


Expand Down

0 comments on commit a68fb00

Please sign in to comment.