Closed anbsky closed 4 years ago
When assertions like assert.Nil(t, err) for extras.errors.Err fail in tests, this is the output I'm getting:
assert.Nil(t, err)
extras.errors.Err
Error Trace: lbrynet_test.go:75 Error: Expected nil, but got: &errors.Error{Err:(*errors.errorString)(0xc0000b06a0), stack:[]uintptr{0x1511f5b, 0x151293a, 0x10fd080, 0x105da11}, frames:[]errors.StackFrame(nil), prefix:""}
In contrast, this is the output for the standard errors.New object in the same spot:
errors.New
Error Trace: lbrynet_test.go:75 Error: Expected nil, but got: &errors.errorString{s:"empty structure from sdk client"}
solution: use assert.NoError(t, err) instead
assert.NoError(t, err) instead
When assertions like
assert.Nil(t, err)
forextras.errors.Err
fail in tests, this is the output I'm getting:In contrast, this is the output for the standard
errors.New
object in the same spot: