diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-08-11 17:40:19 +0000 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-08-11 17:40:19 +0000 |
commit | 8a1d584de771b3267374397cc99c019de1c4500c (patch) | |
tree | 5179bb8aaf72c674cb3caff3c96758dc20d82747 /client/httpclient_test.go | |
parent | 7b44ce1d4a0716d27acabb4f826eb5613dade082 (diff) | |
download | gitlab-shell-8a1d584de771b3267374397cc99c019de1c4500c.tar.gz |
refactor: update usage of NewHTTPClient to NewHTTPClientWithOpts
Diffstat (limited to 'client/httpclient_test.go')
-rw-r--r-- | client/httpclient_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/httpclient_test.go b/client/httpclient_test.go index 5c1ebe3..f3643a0 100644 --- a/client/httpclient_test.go +++ b/client/httpclient_test.go @@ -17,7 +17,8 @@ import ( func TestReadTimeout(t *testing.T) { expectedSeconds := uint64(300) - client := NewHTTPClient("http://localhost:3000", "", "", "", false, expectedSeconds) + client, err := NewHTTPClientWithOpts("http://localhost:3000", "", "", "", false, expectedSeconds, nil) + require.NoError(t, err) require.NotNil(t, client) require.Equal(t, time.Duration(expectedSeconds)*time.Second, client.Client.Timeout) @@ -122,7 +123,8 @@ func TestRequestWithUserAgent(t *testing.T) { func setup(t *testing.T, username, password string, requests []testserver.TestRequestHandler) *GitlabNetClient { url := testserver.StartHttpServer(t, requests) - httpClient := NewHTTPClient(url, "", "", "", false, 1) + httpClient, err := NewHTTPClientWithOpts(url, "", "", "", false, 1, nil) + require.NoError(t, err) client, err := NewGitlabNetClient(username, password, "", httpClient) require.NoError(t, err) |