diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2023-01-25 19:03:45 +0100 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2023-01-25 19:07:08 +0100 |
commit | 952a18f639eeef9f9d85506c5dc23be9549244f2 (patch) | |
tree | 635e1480822476162d938827e251154e9837ff09 /client/httpsclient_test.go | |
parent | 7750f56e0c42d619b2a6354d99601d4b4f311867 (diff) | |
download | gitlab-shell-952a18f639eeef9f9d85506c5dc23be9549244f2.tar.gz |
Stub retryable http values in tests
Currently, the default values are used for retryable http.
That's why a test waits 1 second minimun to retry a request.
Client test takes 25 seconds to execute as a result.
When we stub the value to 1 millisecond instead, we get 0.5s of
execution
Diffstat (limited to 'client/httpsclient_test.go')
-rw-r--r-- | client/httpsclient_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/httpsclient_test.go b/client/httpsclient_test.go index d220171..49152de 100644 --- a/client/httpsclient_test.go +++ b/client/httpsclient_test.go @@ -123,7 +123,7 @@ func setupWithRequests(t *testing.T, caFile, caPath, clientCAPath, clientCertPat url := testserver.StartHttpsServer(t, requests, clientCAPath) - var opts []HTTPClientOpt + opts := defaultHttpOpts if clientCertPath != "" && clientKeyPath != "" { opts = append(opts, WithClientCert(clientCertPath, clientKeyPath)) } |