(t *testing.T)
| 32 | } |
| 33 | |
| 34 | func TestRetriableReaderMakesErrorsRetriable(t *testing.T) { |
| 35 | expected := errors.New("example error") |
| 36 | |
| 37 | r := tools.NewRetriableReader(&ErrReader{expected}) |
| 38 | |
| 39 | var buf [1]byte |
| 40 | n, err := r.Read(buf[:]) |
| 41 | |
| 42 | assert.Equal(t, 0, n) |
| 43 | assert.EqualError(t, err, "LFS: "+expected.Error()) |
| 44 | assert.True(t, errors.IsRetriableError(err)) |
| 45 | |
| 46 | } |
| 47 | |
| 48 | func TestRetriableReaderDoesNotRewrap(t *testing.T) { |
| 49 | // expected is already "retriable", as would be the case if the |
nothing calls this directly
no test coverage detected