Cosign Class Unit Tests
Background
Following the modularization of the Cosign class in upload_to_harbor.py (#669 (closed)), unit test should be added. If we are carrying about code coverage, we need to take the modules into account, so therefore we need to consider the cosign class as well as the scan-logic unit tests.
These unit tests will be covering 3 functions, but once you write one of them, the next 2 are going to be nearly the same things. You will mock up an array, test that you hit subprocess, hit an exception, and it was caught by the decorator.
Acceptance Criteria:
-
Unit tests written to verify/validate Cosign class -
MR including the modularized Cosign class & unit tests reviewed/merged
Definition of Done
-
Write or update any unit or integration tests -
Project pipeline runs successfully -
Add any applicable checkboxes for testing e.g. Ran pipeline in staging env or pipeline-test-project pipeline run -
Solution is captured as code and/or documentation and merge requests have been submitted -
Code review completed and merge request approved/merged -
All Acceptance Criteria have been completed
Edited by ariel.shnitzer