Skip to content

test(available-fix): mock cve data #1513

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

Merged
merged 10 commits into from
Jan 26, 2022
Merged

test(available-fix): mock cve data #1513

merged 10 commits into from
Jan 26, 2022

Conversation

BreadGenie
Copy link
Contributor

fix #1503

@BreadGenie
Copy link
Contributor Author

hmm should we move these mock data to a separate file?

@BreadGenie
Copy link
Contributor Author

should I revert #1512 in this PR?

@terriko
Copy link
Contributor

terriko commented Jan 13, 2022

Yeah, might as well revert #1512 now that the tests don't use external data. Or if you prefer, keep a copy of the old external test and leave that in LONG_TESTS?

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Also, you might want to rebase from main to get the other LONG_TESTS fix and see if that clears up CI.

Other than that, looks good. I'll need to remember to add pytest-mock to our licensing request for 3.1, but it's MIT so I don't anticipate any problem.

@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2022

Codecov Report

Merging #1513 (436cdfd) into main (9934aed) will increase coverage by 1.12%.
The diff coverage is 64.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1513      +/-   ##
==========================================
+ Coverage   79.27%   80.39%   +1.12%     
==========================================
  Files         281      281              
  Lines        5548     5571      +23     
  Branches      905      908       +3     
==========================================
+ Hits         4398     4479      +81     
+ Misses        966      897      -69     
- Partials      184      195      +11     
Flag Coverage Δ
longtests 80.39% <64.81%> (+1.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cve_bin_tool/available_fix/debian_cve_tracker.py 78.00% <53.33%> (+42.58%) ⬆️
test/test_available_fix.py 76.47% <69.23%> (+19.80%) ⬆️
cve_bin_tool/available_fix/__init__.py 82.05% <0.00%> (+23.07%) ⬆️
cve_bin_tool/available_fix/redhat_cve_tracker.py 70.68% <0.00%> (+48.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9934aed...436cdfd. Read the comment docs.

@BreadGenie
Copy link
Contributor Author

I've kept the old tests in LONG_TESTS

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Whoops, thought I'd merged this earlier, but apparently not. Will do so now. Thank you again for getting this set up; I think it'll provide a baseline for moving a few other things to use mock eventually too.

@terriko terriko merged commit 19534e7 into intel:main Jan 26, 2022
@BreadGenie BreadGenie deleted the mock-af branch January 30, 2022 17:27
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.

Offline testing / offline mode for Available Fix checker
3 participants