TestWrapDoAPIError_MessageContainsCause pins that the wrapped error's message is carried into Problem.Message so logs / debugging retain the underlying cause string.
(t *testing.T)
| 303 | // message is carried into Problem.Message so logs / debugging retain the |
| 304 | // underlying cause string. |
| 305 | func TestWrapDoAPIError_MessageContainsCause(t *testing.T) { |
| 306 | raw := errors.New("dial tcp 10.0.0.1:443: i/o timeout") |
| 307 | got := WrapDoAPIError(raw) |
| 308 | if !strings.Contains(got.Error(), "i/o timeout") { |
| 309 | t.Errorf("Error() = %q, want to contain underlying cause", got.Error()) |
| 310 | } |
| 311 | } |
nothing calls this directly
no test coverage detected