talnagar commented on a change in pull request #21851:
URL: https://github.com/apache/airflow/pull/21851#discussion_r816634689
##########
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:
got it.
I removed the existing test from quarantine and parameterized it to check
the use case of with and without run_id.
Hopefully it will be stable now. thanks :relaxed:
--
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]