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

Ensure data known to ScanContainer is in sync with DataProvider #524

Closed mirekdlugosz closed 4 months ago

mirekdlugosz commented 4 months ago

While working on #523, I found new tests are failing because some other tests are removing data. Since DataProvider.cleanup() may remove cache, there's no reason for ScanContainer to keep it.

This protects a tests run against a following scenario:

  1. Have tests create scans using scans fixture
  2. Have another test remove data using data_provider.cleanup()
  3. Have another test try to use scans - data is removed and data_provider removed references, but ScanContainer is not aware of that

Unfortunately, a number of tests remove data using things like qpc clear --all, without ever informing DataProvider. So this is not a solution for general problem of test framework getting out of sync with data actually stored in the server.

In other words, this is theoretically correct thing to do, with minimal pragmatic impact.

codecov[bot] commented 4 months ago

Codecov Report

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

Project coverage is 78.42%. Comparing base (bdb06e0) to head (d6a47a6).

:exclamation: Current head d6a47a6 differs from pull request most recent head cdbb3a1

Please upload reports for the commit cdbb3a1 to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #524 +/- ## ========================================== + Coverage 78.13% 78.42% +0.28% ========================================== Files 7 7 Lines 677 686 +9 ========================================== + Hits 529 538 +9 Misses 148 148 ```

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