Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
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-workhorse
Commits
941b0c37
Commit
941b0c37
authored
Jul 05, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix downloading artifacts entry in main_test.go
parent
d9baa282
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
main_test.go
main_test.go
+3
-3
No files found.
main_test.go
View file @
941b0c37
...
@@ -552,9 +552,9 @@ func TestArtifactsGetSingleFile(t *testing.T) {
...
@@ -552,9 +552,9 @@ func TestArtifactsGetSingleFile(t *testing.T) {
resourcePath
:=
`/namespace/project/builds/123/artifacts/file/`
+
fileName
resourcePath
:=
`/namespace/project/builds/123/artifacts/file/`
+
fileName
ts
:=
testhelper
.
TestServerWithHandler
(
regexp
.
MustCompile
(
`\A`
+
resourcePath
+
`\z`
),
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
ts
:=
testhelper
.
TestServerWithHandler
(
regexp
.
MustCompile
(
`\A`
+
resourcePath
+
`\z`
),
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
encodedFilename
:=
base64
.
StdEncoding
.
EncodeToString
([]
byte
(
fileName
))
encodedFilename
:=
base64
.
StdEncoding
.
EncodeToString
([]
byte
(
fileName
))
if
_
,
err
:=
fmt
.
Fprintf
(
w
,
`{"Archive":"%s","Entry":"%s"}`
,
archivePath
,
encodedFilename
);
err
!=
nil
{
jsonParams
:=
fmt
.
Sprintf
(
`{"Archive":"%s","Entry":"%s"}`
,
archivePath
,
encodedFilename
)
t
.
Fatal
(
err
)
data
:=
base64
.
URLEncoding
.
EncodeToString
([]
byte
(
jsonParams
)
)
}
w
.
Header
()
.
Set
(
"Gitlab-Workhorse-Send-Data"
,
"artifacts-entry:"
+
data
)
return
return
})
})
defer
ts
.
Close
()
defer
ts
.
Close
()
...
...
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