fix: use IPLD.ErrNotFound instead of string comparison in tests
This commit was moved from ipfs/interface-go-ipfs-core@03f4e9cca18f0882ae13f718d4b3e18ef1f361ca This commit was moved from ipfs/boxo@548e3d4298370c022c6e79dbe5614d8c80ea90b9
Jorropo committed
Mar 31, 2022 at 23:55 UTC
9120e3f1f96ec178225cabaac3aba45942f93895
1 file changed
+1
-1
core/coreiface/tests/block.go
+1
-1
@@ -188,7 +188,7 @@ func (tp *TestSuite) TestBlockRm(t *testing.T) {
188
if err == nil {
189
t.Fatal("expected err to exist")
190
}
191
- if !strings.Contains(err.Error(), "not found") {
191
+ if !ipld.IsNotFound(err) {
192
t.Errorf("unexpected error; %s", err.Error())
193
}
194