Skip to content

Commit

Permalink
Add error handling for missing versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fivegrant committed Sep 25, 2023
1 parent 46f34cf commit 5f7c5e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def add_case(testobj):
scenarios[scenario]["description"] = spec["description"]

unified_version = requests.get(f"{settings.TA1_UNIFIED_URL}/version").content.decode()
#mit_version = requests.get(f"{settings.MIT_TR_URL}/debugging/get_sha").json()["mitaskem_commit_sha"]
cosmos_url = requests.get(f"{settings.COSMOS_URL}/version_info").json()["git_hash"]
mit_version = requests.get(f"{settings.MIT_TR_URL}/debugging/get_sha").json().get("mitaskem_commit_sha", "UNAVAILABLE")
cosmos_url = requests.get(f"{settings.COSMOS_URL}/version_info").json().get("git_hash", "UNAVAILABLE")
report = {
"scenarios": scenarios,
"services": {
Expand All @@ -62,7 +62,7 @@ def add_case(testobj):
},
"MIT_TR_URL":{
"source": settings.MIT_TR_URL,
"version": "UNAVAILABLE"#mit_version
"version": mit_version
},
"COSMOS_URL":{
"source": settings.COSMOS_URL,
Expand Down

0 comments on commit 5f7c5e2

Please sign in to comment.