fix: implement backend testing amendments and atomic source publication
Some checks failed
Mostovik Backend CI/CD / Tests and lint (push) Successful in 3m16s
Mostovik Backend CI/CD / Deploy dev (push) Has been cancelled
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been cancelled
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Has been cancelled
Some checks failed
Mostovik Backend CI/CD / Tests and lint (push) Successful in 3m16s
Mostovik Backend CI/CD / Deploy dev (push) Has been cancelled
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been cancelled
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Has been cancelled
This commit is contained in:
@@ -234,7 +234,11 @@ def test_registry_job_status_distinguishes_queue_retry_failure_cancel(
|
||||
assert response.status_code == 200
|
||||
assert response.data["status"] == expected
|
||||
assert response.data["progress"] == 47
|
||||
assert response.data["message"] == "fixture progress"
|
||||
assert response.data["message"] == (
|
||||
"Не удалось обновить данные. Повторите попытку позже."
|
||||
if expected in {"failed", "cancelled"}
|
||||
else "fixture progress"
|
||||
)
|
||||
if raw == "success":
|
||||
job.result = {"status": "skipped"}
|
||||
job.save(update_fields=["result"])
|
||||
@@ -267,9 +271,15 @@ def test_typed_refresh_job_dashboard_history_openapi(admin_client):
|
||||
)
|
||||
assert paths[dashboard]["get"]["operationId"] == "api_v1_parsers_dashboard_list"
|
||||
assert paths[dashboard]["get"]["tags"] == ["api"]
|
||||
assert {"pending", "started", "retry", "failure", "revoked"} <= set(
|
||||
definitions["BackgroundJob"]["properties"]["status"]["enum"]
|
||||
)
|
||||
assert {
|
||||
"queued",
|
||||
"running",
|
||||
"retrying",
|
||||
"failed",
|
||||
"cancelled",
|
||||
"success",
|
||||
"skipped",
|
||||
} == set(definitions["BackgroundJob"]["properties"]["status"]["enum"])
|
||||
logs_path = next(path for path in paths if path.endswith("/system/logs/"))
|
||||
parameters = {item["name"]: item for item in paths[logs_path]["get"]["parameters"]}
|
||||
assert parameters["source"]["type"] == "string"
|
||||
|
||||
Reference in New Issue
Block a user