This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restart actions: added test for airflow utils
- Loading branch information
Showing
8 changed files
with
1,108 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 112 additions & 0 deletions
112
...ffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_delete_workflow_dag.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
interactions: | ||
- request: | ||
body: '{"dag_run_id": "6569b2e7-0ed2-4bcd-91f4-31f2f45f8acf", "conf": {"workflow_id": | ||
"6569b2e7-0ed2-4bcd-91f4-31f2f45f8acf"}}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '119' | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
uri: http://host.docker.internal:8080/api/v1/dags/author_create_initialization_dag/dagRuns | ||
response: | ||
body: | ||
string: "{\n \"conf\": {\n \"workflow_id\": \"6569b2e7-0ed2-4bcd-91f4-31f2f45f8acf\"\n | ||
\ },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": | ||
\"6569b2e7-0ed2-4bcd-91f4-31f2f45f8acf\",\n \"data_interval_end\": \"2024-07-29T13:59:32.188032+00:00\",\n | ||
\ \"data_interval_start\": \"2024-07-29T13:59:32.188032+00:00\",\n \"end_date\": | ||
null,\n \"execution_date\": \"2024-07-29T13:59:32.188032+00:00\",\n \"external_trigger\": | ||
true,\n \"last_scheduling_decision\": null,\n \"logical_date\": \"2024-07-29T13:59:32.188032+00:00\",\n | ||
\ \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n | ||
\ \"state\": \"queued\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '579' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Mon, 29 Jul 2024 13:59:32 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '0' | ||
Content-Type: | ||
- application/json | ||
method: DELETE | ||
uri: http://host.docker.internal:8080/api/v1/dags/author_create_initialization_dag/dagRuns/6569b2e7-0ed2-4bcd-91f4-31f2f45f8acf | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
Connection: | ||
- close | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Mon, 29 Jul 2024 13:59:32 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 204 | ||
message: NO CONTENT | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '0' | ||
Content-Type: | ||
- application/json | ||
method: DELETE | ||
uri: http://host.docker.internal:8080/api/v1/dags/author_create_initialization_dag/dagRuns/6569b2e7-0ed2-4bcd-91f4-31f2f45f8acf | ||
response: | ||
body: | ||
string: "{\n \"detail\": \"DAGRun with DAG ID: 'author_create_initialization_dag' | ||
and DagRun ID: '6569b2e7-0ed2-4bcd-91f4-31f2f45f8acf' not found\",\n \"status\": | ||
404,\n \"title\": \"Not Found\",\n \"type\": \"https://airflow.apache.org/docs/apache-airflow/2.8.3/stable-rest-api-ref.html#section/Errors/NotFound\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '293' | ||
Content-Type: | ||
- application/problem+json | ||
Date: | ||
- Mon, 29 Jul 2024 13:59:32 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 404 | ||
message: NOT FOUND | ||
version: 1 |
183 changes: 183 additions & 0 deletions
183
...office/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_find_executed_dags.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
interactions: | ||
- request: | ||
body: '{"dag_run_id": "41f9047d-f7a4-48cc-b138-3e2fa9e19802", "conf": {"workflow_id": | ||
"41f9047d-f7a4-48cc-b138-3e2fa9e19802"}}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '119' | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
uri: http://host.docker.internal:8080/api/v1/dags/author_create_initialization_dag/dagRuns | ||
response: | ||
body: | ||
string: "{\n \"conf\": {\n \"workflow_id\": \"41f9047d-f7a4-48cc-b138-3e2fa9e19802\"\n | ||
\ },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": | ||
\"41f9047d-f7a4-48cc-b138-3e2fa9e19802\",\n \"data_interval_end\": \"2024-07-29T13:59:32.491551+00:00\",\n | ||
\ \"data_interval_start\": \"2024-07-29T13:59:32.491551+00:00\",\n \"end_date\": | ||
null,\n \"execution_date\": \"2024-07-29T13:59:32.491551+00:00\",\n \"external_trigger\": | ||
true,\n \"last_scheduling_decision\": null,\n \"logical_date\": \"2024-07-29T13:59:32.491551+00:00\",\n | ||
\ \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n | ||
\ \"state\": \"queued\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '579' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Mon, 29 Jul 2024 13:59:32 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Type: | ||
- application/json | ||
method: GET | ||
uri: http://host.docker.internal:8080/api/v1/dags/author_create_initialization_dag/dagRuns/41f9047d-f7a4-48cc-b138-3e2fa9e19802 | ||
response: | ||
body: | ||
string: "{\n \"conf\": {\n \"workflow_id\": \"41f9047d-f7a4-48cc-b138-3e2fa9e19802\"\n | ||
\ },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": | ||
\"41f9047d-f7a4-48cc-b138-3e2fa9e19802\",\n \"data_interval_end\": \"2024-07-29T13:59:32.491551+00:00\",\n | ||
\ \"data_interval_start\": \"2024-07-29T13:59:32.491551+00:00\",\n \"end_date\": | ||
null,\n \"execution_date\": \"2024-07-29T13:59:32.491551+00:00\",\n \"external_trigger\": | ||
true,\n \"last_scheduling_decision\": null,\n \"logical_date\": \"2024-07-29T13:59:32.491551+00:00\",\n | ||
\ \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n | ||
\ \"state\": \"queued\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '579' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Mon, 29 Jul 2024 13:59:32 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Type: | ||
- application/json | ||
method: GET | ||
uri: http://host.docker.internal:8080/api/v1/dags/author_create_approved_dag/dagRuns/41f9047d-f7a4-48cc-b138-3e2fa9e19802 | ||
response: | ||
body: | ||
string: "{\n \"detail\": \"DAGRun with DAG ID: 'author_create_approved_dag' | ||
and DagRun ID: '41f9047d-f7a4-48cc-b138-3e2fa9e19802' not found\",\n \"status\": | ||
404,\n \"title\": \"DAGRun not found\",\n \"type\": \"https://airflow.apache.org/docs/apache-airflow/2.8.3/stable-rest-api-ref.html#section/Errors/NotFound\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '294' | ||
Content-Type: | ||
- application/problem+json | ||
Date: | ||
- Mon, 29 Jul 2024 13:59:32 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 404 | ||
message: NOT FOUND | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Type: | ||
- application/json | ||
method: GET | ||
uri: http://host.docker.internal:8080/api/v1/dags/author_create_rejected_dag/dagRuns/41f9047d-f7a4-48cc-b138-3e2fa9e19802 | ||
response: | ||
body: | ||
string: "{\n \"detail\": \"DAGRun with DAG ID: 'author_create_rejected_dag' | ||
and DagRun ID: '41f9047d-f7a4-48cc-b138-3e2fa9e19802' not found\",\n \"status\": | ||
404,\n \"title\": \"DAGRun not found\",\n \"type\": \"https://airflow.apache.org/docs/apache-airflow/2.8.3/stable-rest-api-ref.html#section/Errors/NotFound\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '294' | ||
Content-Type: | ||
- application/problem+json | ||
Date: | ||
- Mon, 29 Jul 2024 13:59:32 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 404 | ||
message: NOT FOUND | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '0' | ||
Content-Type: | ||
- application/json | ||
method: DELETE | ||
uri: http://host.docker.internal:8080/api/v1/dags/author_create_initialization_dag/dagRuns/41f9047d-f7a4-48cc-b138-3e2fa9e19802 | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
Connection: | ||
- close | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Mon, 29 Jul 2024 13:59:32 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 204 | ||
message: NO CONTENT | ||
version: 1 |
Oops, something went wrong.