diff options
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)) } |