RedHatInsights / insights-core

Insights Core is a data collection and processing framework used by Red Hat Insights
https://cloud.redhat.com/insights
Apache License 2.0
153 stars 183 forks source link

fix: update ls specs, parser definition & test files to support new options #4234

Closed rahulXs closed 1 month ago

rahulXs commented 2 months ago

All Pull Requests:

Check all that apply:

Complete Description of Additions/Changes:

Pytest for parsers:

 insights-core   issue46_core_ls_spec_change  pytest -v insights/tests/parsers/test_ls_boot.py
=========================================================================== test session starts ============================================================================
platform darwin -- Python 3.11.4, pytest-7.4.3, pluggy-1.3.0 -- /Users/rahushar/virtualenvs/gss-rules/bin/python3.11
cachedir: .pytest_cache
rootdir: /Users/rahushar/Projects/insights-core
configfile: setup.cfg
plugins: cov-4.1.0
collected 3 items

insights/tests/parsers/test_ls_boot.py::test_ls_boot PASSED                                                                                                          [ 33%]
insights/tests/parsers/test_ls_boot.py::test_boot_links PASSED                                                                                                       [ 66%]
insights/tests/parsers/test_ls_boot.py::test_doc_examples PASSED                                                                                                     [100%]

============================================================================ 3 passed in 0.06s =============================================================================
 insights-core   issue46_core_ls_spec_change  pytest -v insights/tests/parsers/test_ls_dev.py
=========================================================================== test session starts ============================================================================
platform darwin -- Python 3.11.4, pytest-7.4.3, pluggy-1.3.0 -- /Users/rahushar/virtualenvs/gss-rules/bin/python3.11
cachedir: .pytest_cache
rootdir: /Users/rahushar/Projects/insights-core
configfile: setup.cfg
plugins: cov-4.1.0
collected 2 items

insights/tests/parsers/test_ls_dev.py::test_ls_dev PASSED                                                                                                            [ 50%]
insights/tests/parsers/test_ls_dev.py::test_doc_examples PASSED                                                                                                      [100%]

============================================================================ 2 passed in 0.05s =============================================================================
 insights-core   issue46_core_ls_spec_change  pytest -v insights/tests/parsers/test_ls_sys_firmware.py
=========================================================================== test session starts ============================================================================
platform darwin -- Python 3.11.4, pytest-7.4.3, pluggy-1.3.0 -- /Users/rahushar/virtualenvs/gss-rules/bin/python3.11
cachedir: .pytest_cache
rootdir: /Users/rahushar/Projects/insights-core
configfile: setup.cfg
plugins: cov-4.1.0
collected 2 items

insights/tests/parsers/test_ls_sys_firmware.py::test_ls_sys_firmware PASSED                                                                                          [ 50%]
insights/tests/parsers/test_ls_sys_firmware.py::test_doc_examples PASSED                                                                                             [100%]

============================================================================ 2 passed in 0.06s =============================================================================

References

Lorquas commented 2 months ago

Can one of the admins verify this patch?

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.88%. Comparing base (947a2fe) to head (5220bd9).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4234 +/- ## ======================================= Coverage 76.88% 76.88% ======================================= Files 757 757 Lines 41344 41346 +2 Branches 9526 9526 ======================================= + Hits 31787 31789 +2 Misses 8479 8479 Partials 1078 1078 ``` | [Flag](https://app.codecov.io/gh/RedHatInsights/insights-core/pull/4234/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/RedHatInsights/insights-core/pull/4234/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights) | `76.86% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.