Use testify in secure report project
Proposal
When Use Testify in all Go-based Secure project tests (#230600 - closed) was completed, we missed updating the report project. The purpose of this issue is to use require
from the testify package to simplify the tests in the report
package.
See the original issue Use Testify in all Go-based Secure project tests (#230600 - closed) for further details.
Implementation plan
Replace all occurrences of the following in *_test.go
files:
-
reflect.DeepEqual(want, got)
withrequire.Equal(t, want, got)
-
if err != nil { t.Fatal(err) }
withrequire.NoError(t, err)
-
assert.<some-test>
withrequire.<some-test>
-
cmp.Diff(&want, got)
withrequire.Equal(t, &want, got)
See this Draft MR for an initial implementation: Replace all custom tests with testify (gitlab-org/security-products/analyzers/report!44 - merged).
Edited by Adam Cohen