Closed ianconsolata closed 5 months ago
@ianconsolata done.
When the issue mentions asserting more deeply, I think they meant use assert.DeepEqual (https://pkg.go.dev/gotest.tools/assert#DeepEqual) where appropriate. I don't see any DeepEqual uses here in those PRs (though you did add many more test cases, thanks!). Are there any situations where DeepQual should be used in the tests?
The assert.Equal
(https://github.com/stretchr/testify) function used in these PRs can determine whether two targets have equal types and values, which aligns with the functionality of assert.DeepEqual
you mentioned (https://pkg.go.dev/gotest.tools/assert#DeepEqual). Additionally, the github.com/stretchr/testify/assert
library is more powerful, actively maintained, and is also the testing library used by Lotus. @ianconsolata
Ah, I see! If you feel like the tests thoroughly cover testing deep equality then I'll trust your judgement.
Suggestion 4: Assert Deeper on Tests
Location
Synopsis
Tests in the above files do not assert deeply on the results of method calls. Although they currently function as success path tests, strong assertions should be made on the results of the calls.
Mitigation
We recommend adding stronger assertions to the results from methods in the listed tests.