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

Prevent report and report_json being used if returncode is 0 #45

Merged
merged 3 commits into from
Dec 1, 2023

Conversation

r0x0d
Copy link
Member

@r0x0d r0x0d commented Nov 30, 2023

No description provided.

scripts/conversion_script.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6d213dc) 99.79% compared to head (2ab1c01) 99.79%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #45   +/-   ##
=======================================
  Coverage   99.79%   99.79%           
=======================================
  Files           2        2           
  Lines         491      491           
=======================================
  Hits          490      490           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
@r0x0d r0x0d force-pushed the dont-show-report-in-success branch from 7669cf5 to 2ab1c01 Compare December 1, 2023 12:41
Comment on lines +83 to +84
assert mock_gather_textual_report.call_count == 0
assert mock_transform_raw_data.call_count == 0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests had to be changed because the way we are mocking the run_convert2rhel function is that we are returning a return code 0, meaning that we won't collect the textual report and not transform the raw data to display in insights.

@r0x0d r0x0d merged commit 6b9e3ba into oamg:main Dec 1, 2023
5 checks passed
@r0x0d r0x0d deleted the dont-show-report-in-success branch December 1, 2023 12:54
@mshriver
Copy link

mshriver commented Dec 1, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants