Update test based on corrected error response logic

This commit is contained in:
Dane Everitt 2021-05-02 15:43:22 -07:00
parent 49dd1f7bde
commit c1ff32ad32

View File

@ -61,9 +61,12 @@ func TestRequestRetry(t *testing.T) {
})
c.maxAttempts = 2
r, err = c.request(context.Background(), "get", "", nil)
assert.NoError(t, err)
assert.NotNil(t, r)
assert.Equal(t, http.StatusInternalServerError, r.StatusCode)
assert.Error(t, err)
assert.Nil(t, r)
v := AsRequestError(err)
assert.NotNil(t, v)
assert.Equal(t, http.StatusInternalServerError, v.StatusCode())
assert.Equal(t, 3, i)
}