uranusjr commented on a change in pull request #21851:
URL: https://github.com/apache/airflow/pull/21851#discussion_r816024093



##########
File path: tests/www/views/test_views_trigger_dag.py
##########
@@ -214,3 +214,16 @@ def test_viewer_cant_trigger_dag(app):
         resp = client.get(url, follow_redirects=True)
         response_data = resp.data.decode()
         assert "Access is Denied" in response_data
+
+
+def test_trigger_dag_run_id(admin_client):
+    test_dag_id = "example_bash_operator"
+    test_run_id = "test_id"
+
+    admin_client.post(f'trigger?dag_id={test_dag_id}&run_id={test_run_id}')
+
+    with create_session() as session:
+        run = session.query(DagRun).filter(DagRun.dag_id == 
test_dag_id).first()
+    assert run is not None
+    assert run.run_type == DagRunType.MANUAL
+    assert run.run_id == test_run_id

Review comment:
       Do we have a test for calling `trigger` _without_ `run_id`? If so, the 
two should be combined with `pytest.mark.parametrize`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to