Skip to content

Commit

Permalink
Expose number of found defects in OSH via API
Browse files Browse the repository at this point in the history
  • Loading branch information
lbarcziova committed Nov 15, 2024
1 parent 2c2c8e2 commit 9dc1ba0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packit_service/service/api/osh_scans.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def get_scan_info(scan: OSHScanModel) -> dict:
"task_id": scan.task_id,
"status": scan.status,
"url": scan.url,
"issues_added_count": scan.issues_added_count,
"issues_added_url": scan.issues_added_url,
"issues_fixed_url": scan.issues_fixed_url,
"scan_results_url": scan.scan_results_url,
Expand Down
2 changes: 2 additions & 0 deletions tests_openshift/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ class SampleValues:
# scan
task_id = 123
scan_url = "https://scan-url"
issues_added_count = 3
issues_added_url = "https://issues-added-url"
issues_fixed_url = "https://issues-fixed-url"
scan_results_url = "https://scan-results-url"
Expand Down Expand Up @@ -2503,4 +2504,5 @@ def a_scan(a_copr_build_for_pr):
scan.issues_added_url = SampleValues.issues_added_url
scan.issues_fixed_url = SampleValues.issues_fixed_url
scan.scan_results_url = SampleValues.scan_results_url
scan.issues_added_count = SampleValues.issues_added_count
yield scan
1 change: 1 addition & 0 deletions tests_openshift/service/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,7 @@ def test_scan_info(
assert response_dict["repo_namespace"] == SampleValues.repo_namespace
assert response_dict["repo_name"] == SampleValues.repo_name
assert response_dict["project_url"] == SampleValues.project_url
assert response_dict["issues_added_count"] == SampleValues.issues_added_count


def test_scans_list(
Expand Down

0 comments on commit 9dc1ba0

Please sign in to comment.