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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-workhorse
Commits
c99926dc
Commit
c99926dc
authored
Nov 30, 2015
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into x-blob-raw
parents
c390f92e
6f76893a
Changes
1
Hide 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 @
c99926dc
...
...
@@ -209,7 +209,7 @@ func TestDownloadCacheHit(t *testing.T) {
if
err
:=
os
.
MkdirAll
(
cacheDir
,
0755
);
err
!=
nil
{
t
.
Fatal
(
err
)
}
cachedContent
:=
[]
byte
{
'c'
,
'a'
,
'c'
,
'h'
,
'e'
,
'd'
}
cachedContent
:=
[]
byte
(
"cached"
)
if
err
:=
ioutil
.
WriteFile
(
path
.
Join
(
cacheDir
,
archiveName
),
cachedContent
,
0644
);
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
@@ -406,7 +406,7 @@ func allowedXSendfileDownload(t *testing.T, contentFilename string, filePath str
if
err
:=
os
.
MkdirAll
(
cacheDir
,
0755
);
err
!=
nil
{
t
.
Fatal
(
err
)
}
contentBytes
:=
[]
byte
{
'c'
,
'o'
,
'n'
,
't'
,
'e'
,
'n'
,
't'
}
contentBytes
:=
[]
byte
(
"content"
)
if
err
:=
ioutil
.
WriteFile
(
contentPath
,
contentBytes
,
0644
);
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
@@ -449,7 +449,7 @@ func deniedXSendfileDownload(t *testing.T, contentFilename string, filePath stri
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
if
bytes
.
Compare
(
actual
,
[]
byte
{
'D'
,
'e'
,
'n'
,
'i'
,
'e'
,
'd'
}
)
!=
0
{
if
bytes
.
Compare
(
actual
,
[]
byte
(
"Denied"
)
)
!=
0
{
t
.
Fatal
(
"Unexpected file contents in download"
)
}
}
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