Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-03-12 18:10:44 +0300
committerNick Thomas <nick@gitlab.com>2018-03-12 18:10:44 +0300
commit62157ad75971bbc687ebf7990649a035820e4644 (patch)
tree6348f01126f7633c2cb19ea73b62f321e22c208d
parent575f1200cb93e7e8241ab0fbfe773b5f3c2d0b22 (diff)
parent0a18027e81ca05ed6392fe4669340de4ee18eec0 (diff)
Merge branch 'fix-reponse-timeout-swap' into 'master'
Fix response timeout swap in test See merge request gitlab-org/gitlab-pages!69
-rw-r--r--acceptance_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/acceptance_test.go b/acceptance_test.go
index 9d4c3302..ff80a7a4 100644
--- a/acceptance_test.go
+++ b/acceptance_test.go
@@ -320,10 +320,11 @@ func TestObscureMIMEType(t *testing.T) {
func TestArtifactProxyRequest(t *testing.T) {
skipUnlessEnabled(t)
- defer func(rt http.RoundTripper) {
- InsecureHTTPSClient.Transport = rt
- }(InsecureHTTPSClient.Transport)
- (InsecureHTTPSClient.Transport).(*http.Transport).ResponseHeaderTimeout = 5 * time.Second
+ transport := (InsecureHTTPSClient.Transport).(*http.Transport)
+ defer func(t time.Duration) {
+ transport.ResponseHeaderTimeout = t
+ }(transport.ResponseHeaderTimeout)
+ transport.ResponseHeaderTimeout = 5 * time.Second
content := "<!DOCTYPE html><html><head><title>Title of the document</title></head><body></body></html>"
contentLength := int64(len(content))