summaryrefslogtreecommitdiff
path: root/client/httpsclient_test.go
diff options
context:
space:
mode:
authorIgor Drozdov <idrozdov@gitlab.com>2023-01-25 19:03:45 +0100
committerIgor Drozdov <idrozdov@gitlab.com>2023-01-25 19:07:08 +0100
commit952a18f639eeef9f9d85506c5dc23be9549244f2 (patch)
tree635e1480822476162d938827e251154e9837ff09 /client/httpsclient_test.go
parent7750f56e0c42d619b2a6354d99601d4b4f311867 (diff)
downloadgitlab-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.go2
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))
}