quipucords / camayoc

Test automation framework that facilitates functional testing of quipucords.
https://camayoc.readthedocs.io/
GNU General Public License v3.0
5 stars 4 forks source link

fix: expect internal facts since QPC_EXCLUDE_INTERNAL_FACTS is now disabled by default #437

Closed infinitewarp closed 1 year ago

infinitewarp commented 1 year ago

I confirmed that the tests that failed for the recent quipucords PR (https://github.com/quipucords/quipucords/pull/2459) also failed for my local environment, and they passed after this change. I also encountered one other local failure, but I did not see that failure in the recent quipucords PR. So, I suspect it might be a fluke or local configuration issue.

The tests that were failing in quipucords/pull/2459 but now pass:

camayoc/tests/qpc/cli/test_reports.py::test_detail_report[csv-report]
camayoc/tests/qpc/cli/test_reports.py::test_detail_report[csv-scan-job]
camayoc/tests/qpc/cli/test_reports.py::test_detail_report[json-report]
camayoc/tests/qpc/cli/test_reports.py::test_detail_report[json-scan-job]

The one test that fails for me locally that I think may just be a local environment issue:

camayoc/tests/qpc/cli/test_scanjobs.py::test_scanjob - camayoc.exceptions.FailedScanException: The scan with ID "1" has failed unexpectedly.

See also https://github.com/quipucords/quipucords/pull/2452

Relates to JIRA: DISCOVERY-412 https://issues.redhat.com/browse/DISCOVERY-412

codecov[bot] commented 1 year ago

Codecov Report

Merging #437 (28732f5) into main (eed0bd2) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #437   +/-   ##
=======================================
  Coverage   79.11%   79.11%           
=======================================
  Files           5        5           
  Lines         249      249           
=======================================
  Hits          197      197           
  Misses         52       52           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

:loudspeaker: Have feedback on the report? Share it here.

infinitewarp commented 1 year ago

In case it's relevant, here is the more detailed output for the one test that is failing for me locally:

camayoc.exceptions.FailedScanException: The scan with ID "1" has failed unexpectedly.

The information about the scan is:
{'end_time': '2023-09-07T18:07:34.585063',
 'id': 1,
 'options': {'max_concurrency': 50},
 'scan': {'id': 1, 'name': 'ansible-testlab'},
 'scan_type': 'inspect',
 'sources': [{'id': 1, 'name': 'ansible-testlab', 'source_type': 'ansible'}],
 'start_time': '2023-09-07T18:07:29.583089',
 'status': 'failed',
 'status_message': 'Scan manager failed job due to unexpected error.',
 'system_fingerprint_count': 0,
 'systems_count': 1,
 'systems_failed': 0,
 'systems_scanned': 0,
 'systems_unreachable': 0,
 'tasks': [{'scan_type': 'connect',
            'sequence_number': 1,
            'source': 1,
            'start_time': '2023-09-07T18:07:29.758095',
            'status': 'running',
            'status_message': 'Task is running.',
            'systems_count': 1,
            'systems_failed': 0,
            'systems_scanned': 0,
            'systems_unreachable': 0},
           {'scan_type': 'inspect',
            'sequence_number': 2,
            'source': 1,
            'status': 'pending',
            'status_message': 'Task is pending.',
            'systems_count': 0,
            'systems_failed': 0,
            'systems_scanned': 0,
            'systems_unreachable': 0},
           {'scan_type': 'fingerprint',
            'sequence_number': 3,
            'status': 'pending',
            'status_message': 'Task is pending.',
            'system_fingerprint_count': 0,
            'systems_count': 0,
            'systems_failed': 0,
            'systems_scanned': 0,
            'systems_unreachable': 0}]}
mirekdlugosz commented 1 year ago

I trust this fixes the problem. Looks pretty much what I would expect in case like this.

I will take a look at your local problem tomorrow.