Add specs for Gitlab::VulnerabilityScanning::SecurityScanner
Problem to solve
The following discussion from !138754 (merged) should be addressed:
-
@fcatteau started a discussion: (+1 comment) Code looks good to me, but I only have one question regarding the test. Should we add a regression test to validate that this fix actually fixes the initial problem?
@brytannia I wouldn't how to test for a race condition like this. Do we have tests like this in the codebase?
Also, as we add more logic to
VulnerabilityScanning::SecurityScanner
I feel that it's time to add a unit test for it. I imagine a situation in future when we add some more logic or need to fix some other bug, the we would require to have a unit test and it's better to have it from the start.Yes, that makes sense. Would it be acceptable do to that in a follow up MR that I commit to do, so that this doesn't delay the fix?
Implementation plan
-
Add specs for Gitlab::VulnerabilityScanning::SecurityScanner
.