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
92b51f76
Commit
92b51f76
authored
Jan 11, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve static file test failures
parent
132309aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
main_test.go
main_test.go
+5
-5
No files found.
main_test.go
View file @
92b51f76
...
@@ -311,21 +311,21 @@ func TestAllowedStaticFile(t *testing.T) {
...
@@ -311,21 +311,21 @@ func TestAllowedStaticFile(t *testing.T) {
}
{
}
{
resp
,
err
:=
http
.
Get
(
ws
.
URL
+
resource
)
resp
,
err
:=
http
.
Get
(
ws
.
URL
+
resource
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Error
(
err
)
}
}
defer
resp
.
Body
.
Close
()
defer
resp
.
Body
.
Close
()
buf
:=
&
bytes
.
Buffer
{}
buf
:=
&
bytes
.
Buffer
{}
if
_
,
err
:=
io
.
Copy
(
buf
,
resp
.
Body
);
err
!=
nil
{
if
_
,
err
:=
io
.
Copy
(
buf
,
resp
.
Body
);
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Error
(
err
)
}
}
if
buf
.
String
()
!=
content
{
if
buf
.
String
()
!=
content
{
t
.
Fatal
f
(
"GET %q: Expected %q, got %q"
,
resource
,
content
,
buf
.
String
())
t
.
Error
f
(
"GET %q: Expected %q, got %q"
,
resource
,
content
,
buf
.
String
())
}
}
if
resp
.
StatusCode
!=
200
{
if
resp
.
StatusCode
!=
200
{
t
.
Fatal
f
(
"GET %q: expected 200, got %d"
,
resource
,
resp
.
StatusCode
)
t
.
Error
f
(
"GET %q: expected 200, got %d"
,
resource
,
resp
.
StatusCode
)
}
}
if
proxied
{
if
proxied
{
t
.
Fatal
f
(
"GET %q: should not have made it to backend"
,
resource
)
t
.
Error
f
(
"GET %q: should not have made it to backend"
,
resource
)
}
}
}
}
}
}
...
...
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