Update test based on corrected error response logic
This commit is contained in:
parent
49dd1f7bde
commit
c1ff32ad32
|
@ -61,9 +61,12 @@ func TestRequestRetry(t *testing.T) {
|
||||||
})
|
})
|
||||||
c.maxAttempts = 2
|
c.maxAttempts = 2
|
||||||
r, err = c.request(context.Background(), "get", "", nil)
|
r, err = c.request(context.Background(), "get", "", nil)
|
||||||
assert.NoError(t, err)
|
assert.Error(t, err)
|
||||||
assert.NotNil(t, r)
|
assert.Nil(t, r)
|
||||||
assert.Equal(t, http.StatusInternalServerError, r.StatusCode)
|
|
||||||
|
v := AsRequestError(err)
|
||||||
|
assert.NotNil(t, v)
|
||||||
|
assert.Equal(t, http.StatusInternalServerError, v.StatusCode())
|
||||||
assert.Equal(t, 3, i)
|
assert.Equal(t, 3, i)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user