xenserver / status-report

Program that gathers data for xenserver host diagnostics
GNU Lesser General Public License v2.1
1 stars 9 forks source link

CA-390129: Add the unit test case for the exception handler added in #94 #97

Closed bernhardkaindl closed 7 months ago

bernhardkaindl commented 7 months ago

This new test confirms that log_exceptions() (added with #94) logs exception messages to the collected xen-bugtool.log file and to stdout.

This PR also has a 2nd commit with a note on how to best skip a pre-commit check for rebasing the PR branch:

github-actions[bot] commented 7 months ago

Coverage

Pytest Code coverage comment for Python 2.7
FileStmtsMissCoverMissing
integration
   __init__.py00100% 
   conftest.py180100% 
   namespace_container.py35197%114
   test_system_load.py180100% 
   test_xenserverconfig.py150100% 
   utils.py681085%19, 32, 62–65, 71, 91, 94, 151
mocks/xen
   __init__.py00100% 
mocks/xen/lowlevel
   __init__.py00100% 
mocks/xen/lowlevel/xc
   __init__.py50100% 
unit
   __init_\.py00100% 
   conftest.py52982%68, 70–74, 77–79
   test_dir_list.py110100% 
   test_dump_xapi_procs.py120100% 
   test_dump_xapi_rrds.py65198%12
   test_filter_xapi_clusterd_db.py780100% 
   test_fs_funcs.py140100% 
   test_load_plugins.py90100% 
   test_main.py134199%131
   test_output.py730100% 
   test_process_output.py110100% 
   test_snmp.py150100% 
   test_xapidb_filter.py210100% 
TOTAL6542296% 

Tests Skipped Failures Errors Time
36 0 :zzz: 0 :x: 0 :fire: 2.260s :stopwatch:
codecov[bot] commented 7 months ago

Codecov Report

Merging #97 (8c29fd5) into master (d0e569d) will increase coverage by 10%. Report is 16 commits behind head on master. The diff coverage is 100%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #97 +/- ## ====================================== + Coverage 88% 98% +10% ====================================== Files 18 18 Lines 2196 665 -1531 ====================================== - Hits 1939 654 -1285 + Misses 257 11 -246 ``` | [Files](https://app.codecov.io/gh/xenserver/status-report/pull/97?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xenserver) | Coverage Δ | | |---|---|---| | [tests/unit/test\_dump\_xapi\_rrds.py](https://app.codecov.io/gh/xenserver/status-report/pull/97?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xenserver#diff-dGVzdHMvdW5pdC90ZXN0X2R1bXBfeGFwaV9ycmRzLnB5) | `100% <100%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/xenserver/status-report/pull/97/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xenserver) | [Flag](https://app.codecov.io/gh/xenserver/status-report/pull/97/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xenserver) | Coverage Δ | | |---|---|---| | [python2.7](https://app.codecov.io/gh/xenserver/status-report/pull/97/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xenserver) | `96% <100%> (+9%)` | :arrow_up: | | [python3.10.13](https://app.codecov.io/gh/xenserver/status-report/pull/97/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xenserver) | `100% <100%> (+12%)` | :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=xenserver#carryforward-flags-in-the-pull-request-comment) to find out more.
github-actions[bot] commented 7 months ago

Coverage

Python3 coverage comment from https://github.com/marketplace/actions/pytest-coverage-comment
FileStmtsMissCoverMissing
__init__.py00100% 
conftest.py600100% 
test_dir_list.py110100% 
test_dump_xapi_procs.py120100% 
test_dump_xapi_rrds.py670100% 
test_filter_xapi_clusterd_db.py780100% 
test_fs_funcs.py140100% 
test_load_plugins.py90100% 
test_main.py1350100% 
test_output.py730100% 
test_process_output.py110100% 
test_snmp.py150100% 
test_xapidb_filter.py210100% 
TOTAL5060100% 

Tests Skipped Failures Errors Time
32 0 :zzz: 0 :x: 0 :fire: 0.980s :stopwatch:
coveralls commented 7 months ago

Pull Request Test Coverage Report for Build 8419657512

Details


Totals Coverage Status
Change from base Build 8419300538: 0.1%
Covered Lines: 677
Relevant Lines: 712

💛 - Coveralls