From c1ff32ad32e37ae7046e87d77b8162d5b225311b Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 2 May 2021 15:43:22 -0700 Subject: [PATCH] Update test based on corrected error response logic --- remote/http_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/remote/http_test.go b/remote/http_test.go index 1b65943..08aa39a 100644 --- a/remote/http_test.go +++ b/remote/http_test.go @@ -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) }