fix: ftest upload payload and route building
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
ec2eabe19b
commit
e2ddad2a24
1 changed files with 9 additions and 5 deletions
14
run.py
14
run.py
|
@ -139,19 +139,23 @@ def upload_logs_to_ftest(success: bool, logs: str):
|
|||
(
|
||||
parsed_ftest_host.scheme,
|
||||
parsed_ftest_host.netloc,
|
||||
"/api/v1/results",
|
||||
f"/api/v1/{FTEST_AUTH}/results",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"" "",
|
||||
)
|
||||
)
|
||||
logger.info("Uploading logs to ftest server {ftest}")
|
||||
logger.info(f"Uploading logs to ftest server {ftest}")
|
||||
|
||||
payload = {"success": success, "logs": logs, "auth": FTEST_AUTH}
|
||||
payload = {"success": success, "logs": logs}
|
||||
|
||||
res = requests.post(
|
||||
FTEST_HOST, json=payload, headers={"Origin": "http://example.org"}
|
||||
)
|
||||
logger.info("Upload successful")
|
||||
if res.status_code == 200:
|
||||
logger.info("Upload successful")
|
||||
else:
|
||||
print(res)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in a new issue