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

Remove test_pause_cancel_restart CLI tests #503

Closed ruda closed 5 months ago

ruda commented 6 months ago

Rationale: they have been skipped for a long time and the pause / cancel / restart feature is not in current higher priority. Let's remove this old code.

codecov[bot] commented 6 months ago

Codecov Report

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

Project coverage is 76.75%. Comparing base (9b29095) to head (21051df).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #503 +/- ## ======================================= Coverage 76.75% 76.75% ======================================= Files 7 7 Lines 697 697 ======================================= Hits 535 535 Misses 162 162 ```

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

bruno-fs commented 6 months ago

Pause and Restart have indeed been deprecated, but I'm not sure we should get rid of the cancel test.

cancel will still be part of discovery, so I'd say to keep it. We could take this opportunity to fix the flakiness associated to this test.

mirekdlugosz commented 6 months ago

@bruno-fs there's a misunderstanding here. In this PR, Ruda is removing two tests that first pause a scan, and then restart / cancel it. Since you can't pause scans any more, these tests can be safely removed.

We have separate test for verifying that scan can be cancelled, that is camayoc/tests/qpc/cli/test_scanjobs.py::test_scanjob_cancel. That one stays, nothing is changing.

@ruda this PR needs to be rebased on top of main before we can merge it.

Other than that, removal of these two tests gives space for more removals: camayoc/tests/qpc/api/v1/utils.py (functions prepare_scan and get_source; wait_until_state is used by reports script and data provider, so it needs to stay - but could be moved to some other place), references to "pause", "paused" in camayoc/constants.py, pause() method in camayoc/qpc_models.py. Maybe more, I'm not sure. Of course we can do cleanups in later PR.

Do you want to work on rebasing and more removals? If not, I can take over.

ruda commented 5 months ago

Do you want to work on rebasing and more removals? If not, I can take over.

I'm going to rebase it and merge. I can can do the removals in other PR. Thanks Mirek!