Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9c0d4f6e
Commit
9c0d4f6e
authored
Jun 07, 2021
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workhorse: clean up httprs test tempfiles
parent
8baad3c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
workhorse/internal/httprs/httprs_test.go
workhorse/internal/httprs/httprs_test.go
+8
-0
No files found.
workhorse/internal/httprs/httprs_test.go
View file @
9c0d4f6e
...
...
@@ -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
))
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment