Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
squadutilslib: Update get_reproducer to use helper function
Browse files Browse the repository at this point in the history
Update get_reproducer to use the get_reproducer_from_testrun function to
download the reproducer from the testrun.

Signed-off-by: Katie Worton <[email protected]>
  • Loading branch information
katieworton committed Nov 20, 2023
1 parent e301c26 commit f279421
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions squadutilslib.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,20 +237,11 @@ def get_reproducer(
# In theory there should only be one of those
logger.debug(f"Testrun id: {testrun.id}")

try:
if local:
reproducer = get_file(
f"{testrun.job_url}/reproducer", filename=filename
)
else:
reproducer = get_file(
f"{testrun.job_url}/tuxsuite_reproducer", filename=filename
)
except HTTPError:
logger.error(f"Reproducer not found at {testrun.job_url}!")
raise ReproducerNotFound
reproducer, is_test_reproducer = get_reproducer_from_testrun(
testrun.id, filename, local
)
return (
Path(reproducer).read_text(encoding="utf-8"),
reproducer,
Build(getid(testrun.build)).metadata.git_describe,
testrun.metadata.build_name,
)
Expand Down

0 comments on commit f279421

Please sign in to comment.