generated from coulomb/repo-seed
local OpenCMIS TCK runtime
This commit is contained in:
@@ -244,6 +244,7 @@ def _normalize_json_result(
|
||||
returncode: int,
|
||||
selected_group: str | None,
|
||||
) -> dict[str, Any]:
|
||||
artifact_refs = _artifact_refs_from_payload(payload)
|
||||
cases = _json_cases(payload)
|
||||
if cases:
|
||||
counts: dict[str, int] = {}
|
||||
@@ -268,7 +269,7 @@ def _normalize_json_result(
|
||||
"result_counts": counts,
|
||||
"cases": normalized_cases[:200],
|
||||
},
|
||||
"artifact_refs": [],
|
||||
"artifact_refs": artifact_refs,
|
||||
}
|
||||
|
||||
result = _normalize_case_status(str(payload.get("result", "unknown")))
|
||||
@@ -282,7 +283,7 @@ def _normalize_json_result(
|
||||
"result_counts": {result: 1},
|
||||
"payload": payload,
|
||||
},
|
||||
"artifact_refs": [],
|
||||
"artifact_refs": artifact_refs,
|
||||
}
|
||||
|
||||
|
||||
@@ -327,6 +328,13 @@ def _json_cases(payload: dict[str, Any]) -> list[dict[str, Any]]:
|
||||
return []
|
||||
|
||||
|
||||
def _artifact_refs_from_payload(payload: dict[str, Any]) -> list[str]:
|
||||
refs = payload.get("artifact_refs", [])
|
||||
if not isinstance(refs, list):
|
||||
return []
|
||||
return [ref for ref in refs if isinstance(ref, str) and ref]
|
||||
|
||||
|
||||
def _aggregate_result(counts: dict[str, int], returncode: int) -> str:
|
||||
if counts.get("infrastructure_error"):
|
||||
return "infrastructure_error"
|
||||
@@ -413,10 +421,12 @@ def _expand_arg(
|
||||
return (
|
||||
value.replace("{run_dir}", context["run_dir"])
|
||||
.replace("{artifact_dir}", str(artifact_dir))
|
||||
.replace("{extension_path}", context["extension_path"])
|
||||
.replace("{browser_url}", _browser_url(context) or "")
|
||||
.replace("{repository_id}", _repository_id(context) or "")
|
||||
.replace("{check_group}", selected_group or "")
|
||||
.replace("{target_id}", context["target_profile"]["id"])
|
||||
.replace("{timeout_seconds}", str(int(_timeout_seconds(context))))
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user