Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: [AEA-0000] - fix psu tests #1359

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions scripts/run_regression_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
import time

# This should be set to a known good version of regression test repo
REGRESSION_TESTS_REPO_TAG = "e3fca65a0a66b32a38b6b577b37e4d0b6d17bc5c"
REGRESSION_TESTS_REPO_TAG = "fix_psu_tests_2"

GITHUB_API_URL = "https://api.github.com/repos/NHSDigital/electronic-prescription-service-api-regression-tests/actions"
GITHUB_RUN_URL = "https://github.com/NHSDigital/electronic-prescription-service-api-regression-tests/actions/runs"


def get_headers():
Expand Down Expand Up @@ -142,9 +143,7 @@ def check_job():
job = get_job()
job_status = job["status"]

assert (
job["conclusion"] == "success"
), "The regressions test step failed! There are likely test failures."
return job["conclusion"]


if __name__ == "__main__":
Expand All @@ -170,5 +169,15 @@ def check_job():
trigger_test_run()

workflow_id = find_workflow()
check_job()
job_status = check_job()
if job_status != "success":
if arguments.pr_label:
pr_label = arguments.pr_label.lower()
env = f"PULL-REQUEST/{pr_label}"
else:
env = arguments.env.upper()
print("The regressions test step failed! There are likely test failures.")
print(f"See {GITHUB_RUN_URL}/{workflow_id}/ for run details)")
print(f"See https://nhsdigital.github.io/eps-test-reports/psu/{env}/ for allure report")
raise Exception("Regression test failed")
print("Success!")
Loading