|
20 | 20 | /* eslint-disable unicorn/no-null */ |
21 | 21 | import { http, HttpResponse, type HttpHandler } from "msw"; |
22 | 22 |
|
| 23 | +export const MOCK_DAG = { |
| 24 | + asset_expression: null, |
| 25 | + catchup: false, |
| 26 | + concurrency: 16, |
| 27 | + dag_display_name: "tutorial_taskflow_api", |
| 28 | + dag_id: "tutorial_taskflow_api", |
| 29 | + dag_run_timeout: null, |
| 30 | + default_view: "grid", |
| 31 | + description: null, |
| 32 | + doc_md: |
| 33 | + "\n ### TaskFlow API Tutorial Documentation\n This is a simple data pipeline example which demonstrates the use of\n the TaskFlow API using three simple tasks for Extract, Transform, and Load.\n Documentation that goes along with the Airflow TaskFlow API tutorial is\n located\n [here](https://airflow.apache.org/docs/apache-airflow/stable/tutorial_taskflow_api.html)\n ", |
| 34 | + end_date: null, |
| 35 | + file_token: |
| 36 | + ".eJw9yUsOgCAMBcC7cAB7JPISizR82kCJcnvjxtUsJlDWxlQwPEvhjU7TV0pk27N2goxU9f7lB80qxxPXJF-uQ1CjY5avI0wO2-EFouohiw.fhdU5u0Pb7lElEd-AUUXqjHSsdo", |
| 37 | + fileloc: "/airflow/dags/tutorial_taskflow_api.py", |
| 38 | + has_import_errors: false, |
| 39 | + has_task_concurrency_limits: false, |
| 40 | + is_active: true, |
| 41 | + is_paused: false, |
| 42 | + is_paused_upon_creation: null, |
| 43 | + last_expired: null, |
| 44 | + last_parsed: "2025-01-13T04:33:54.141792Z", |
| 45 | + last_parsed_time: "2025-01-13T04:34:13.543097Z", |
| 46 | + max_active_runs: 16, |
| 47 | + max_active_tasks: 16, |
| 48 | + max_consecutive_failed_dag_runs: 0, |
| 49 | + next_dagrun: null, |
| 50 | + next_dagrun_create_after: null, |
| 51 | + next_dagrun_data_interval_end: null, |
| 52 | + next_dagrun_data_interval_start: null, |
| 53 | + owners: ["airflow"], |
| 54 | + params: {}, |
| 55 | + render_template_as_native_obj: false, |
| 56 | + start_date: "2021-01-01T00:00:00Z", |
| 57 | + tags: [{ dag_id: "tutorial_taskflow_api", name: "example" }], |
| 58 | + template_search_path: null, |
| 59 | + timetable_description: "Never, external triggers only", |
| 60 | + timetable_summary: null, |
| 61 | + timezone: "UTC", |
| 62 | +}; |
| 63 | + |
23 | 64 | export const handlers: Array<HttpHandler> = [ |
24 | | - http.get("/public/dags/tutorial_taskflow_api/details", () => |
25 | | - HttpResponse.json({ |
26 | | - asset_expression: null, |
27 | | - catchup: false, |
28 | | - concurrency: 16, |
29 | | - dag_display_name: "tutorial_taskflow_api", |
30 | | - dag_id: "tutorial_taskflow_api", |
31 | | - dag_run_timeout: null, |
32 | | - default_view: "grid", |
33 | | - description: null, |
34 | | - doc_md: |
35 | | - "\n ### TaskFlow API Tutorial Documentation\n This is a simple data pipeline example which demonstrates the use of\n the TaskFlow API using three simple tasks for Extract, Transform, and Load.\n Documentation that goes along with the Airflow TaskFlow API tutorial is\n located\n [here](https://airflow.apache.org/docs/apache-airflow/stable/tutorial_taskflow_api.html)\n ", |
36 | | - end_date: null, |
37 | | - file_token: |
38 | | - ".eJw9yUsOgCAMBcC7cAB7JPISizR82kCJcnvjxtUsJlDWxlQwPEvhjU7TV0pk27N2goxU9f7lB80qxxPXJF-uQ1CjY5avI0wO2-EFouohiw.fhdU5u0Pb7lElEd-AUUXqjHSsdo", |
39 | | - fileloc: "/airflow/dags/tutorial_taskflow_api.py", |
40 | | - has_import_errors: false, |
41 | | - has_task_concurrency_limits: false, |
42 | | - is_active: true, |
43 | | - is_paused: false, |
44 | | - is_paused_upon_creation: null, |
45 | | - last_expired: null, |
46 | | - last_parsed: "2025-01-13T04:33:54.141792Z", |
47 | | - last_parsed_time: "2025-01-13T04:34:13.543097Z", |
48 | | - max_active_runs: 16, |
49 | | - max_active_tasks: 16, |
50 | | - max_consecutive_failed_dag_runs: 0, |
51 | | - next_dagrun: null, |
52 | | - next_dagrun_create_after: null, |
53 | | - next_dagrun_data_interval_end: null, |
54 | | - next_dagrun_data_interval_start: null, |
55 | | - owners: ["airflow"], |
56 | | - params: {}, |
57 | | - render_template_as_native_obj: false, |
58 | | - start_date: "2021-01-01T00:00:00Z", |
59 | | - tags: [{ dag_id: "tutorial_taskflow_api", name: "example" }], |
60 | | - template_search_path: null, |
61 | | - timetable_description: "Never, external triggers only", |
62 | | - timetable_summary: null, |
63 | | - timezone: "UTC", |
64 | | - }), |
65 | | - ), |
| 65 | + http.get("/public/dags/tutorial_taskflow_api/details", () => HttpResponse.json(MOCK_DAG)), |
66 | 66 | ]; |
0 commit comments