diff --git a/workflows/dags/author/author_create/author_create_rejected.py b/workflows/dags/author/author_create/author_create_rejected.py index 1938e1c9c..d761c1691 100644 --- a/workflows/dags/author/author_create/author_create_rejected.py +++ b/workflows/dags/author/author_create/author_create_rejected.py @@ -15,6 +15,7 @@ params={ "workflow_id": Param(type="string", default=""), "data": Param(type="object", default={}), + "collection": Param(type="string", default=AUTHORS), }, start_date=datetime.datetime(2024, 5, 5), schedule=None, diff --git a/workflows/tests/test_dags_integrity.py b/workflows/tests/test_dags_integrity.py index 86d1b16d2..6832fda84 100644 --- a/workflows/tests/test_dags_integrity.py +++ b/workflows/tests/test_dags_integrity.py @@ -1,6 +1,17 @@ from airflow.models import DagBag -def test_dagbag(): +class TestDagsIntegrity: dag_bag = DagBag(include_examples=False) - assert not dag_bag.import_errors + + def test_dagbag(self): + assert not self.dag_bag.import_errors + + def test_on_failure_callback(self): + for dag_id, dag in self.dag_bag.dags.items(): + if ( + dag.__dict__.get("on_failure_callback") + and dag.__dict__.get("on_failure_callback").__name__ + == "set_workflow_status_to_error" + ): + assert "collection" in dag.__dict__["params"], dag_id