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
bc07c5a4
Commit
bc07c5a4
authored
Aug 25, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs to LFS requests to a secondary Gitlab Geo node
parent
e4ecd5db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
spec/lib/gitlab/middleware/readonly_geo_spec.rb
spec/lib/gitlab/middleware/readonly_geo_spec.rb
+30
-0
No files found.
spec/lib/gitlab/middleware/readonly_geo_spec.rb
View file @
bc07c5a4
...
...
@@ -82,6 +82,21 @@ describe Gitlab::Middleware::ReadonlyGeo do
expect
(
subject
).
to
disallow_request
end
it
'expects a POST LFS request to upload objects to be disallowed'
do
body
=
ActiveSupport
::
JSON
.
encode
({
'operation'
=>
'upload'
,
'objects'
=>
[
{
'oid'
=>
'12345678'
,
'size'
=>
'123'
}
]
})
response
=
request
.
post
(
'/root/rouge.git/info/lfs/objects/batch'
,
input:
StringIO
.
new
(
body
))
expect
(
response
).
to
be_a_redirect
expect
(
subject
).
to
disallow_request
end
context
'whitelisted requests'
do
it
'expects DELETE request to logout to be allowed'
do
response
=
request
.
delete
(
'/users/sign_out'
)
...
...
@@ -103,6 +118,21 @@ describe Gitlab::Middleware::ReadonlyGeo do
expect
(
response
).
not_to
be_a_redirect
expect
(
subject
).
not_to
disallow_request
end
it
'expects a POST LFS request to download objects to be allowed'
do
body
=
ActiveSupport
::
JSON
.
encode
({
'operation'
=>
'download'
,
'objects'
=>
[
{
'oid'
=>
'12345678'
,
'size'
=>
'123'
}
]
})
response
=
request
.
post
(
'/root/rouge.git/info/lfs/objects/batch'
,
input:
StringIO
.
new
(
body
))
expect
(
response
).
not_to
be_a_redirect
expect
(
subject
).
not_to
disallow_request
end
end
end
...
...
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