diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /workhorse/internal/httprs/httprs_test.go | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'workhorse/internal/httprs/httprs_test.go')
-rw-r--r-- | workhorse/internal/httprs/httprs_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/workhorse/internal/httprs/httprs_test.go b/workhorse/internal/httprs/httprs_test.go index 62279d895c9..e26d2d21215 100644 --- a/workhorse/internal/httprs/httprs_test.go +++ b/workhorse/internal/httprs/httprs_test.go @@ -53,6 +53,10 @@ func (f *fakeRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) { if err != nil { return nil, err } + if err := os.Remove(fw.tmp.Name()); err != nil { + return nil, err + } + if f.downgradeZeroToNoRange { // There are implementations that downgrades bytes=0- to a normal un-ranged GET if r.Header.Get("Range") == "bytes=0-" { @@ -79,6 +83,10 @@ func newRSFactory(flags int) RSFactory { if err != nil { return nil } + if err := os.Remove(tmp.Name()); err != nil { + return nil + } + for i := 0; i < SZ; i++ { tmp.WriteString(fmt.Sprintf("%04d", i)) } |