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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
d56e4222
Commit
d56e4222
authored
Apr 04, 2017
by
Ahmad Sherif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable support for Gitaly PostReceivePack
See
https://gitlab.com/gitlab-org/gitaly/issues/172
parent
5f7ebfb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
19 deletions
+22
-19
lib/gitlab/workhorse.rb
lib/gitlab/workhorse.rb
+2
-1
spec/lib/gitlab/workhorse_spec.rb
spec/lib/gitlab/workhorse_spec.rb
+20
-18
No files found.
lib/gitlab/workhorse.rb
View file @
d56e4222
...
@@ -35,7 +35,8 @@ module Gitlab
...
@@ -35,7 +35,8 @@ module Gitlab
feature_enabled
=
case
action
.
to_s
feature_enabled
=
case
action
.
to_s
when
'git_receive_pack'
when
'git_receive_pack'
Gitlab
::
GitalyClient
.
feature_enabled?
(
:post_receive_pack
)
# Disabled for now, see https://gitlab.com/gitlab-org/gitaly/issues/172
false
when
'git_upload_pack'
when
'git_upload_pack'
Gitlab
::
GitalyClient
.
feature_enabled?
(
:post_upload_pack
)
Gitlab
::
GitalyClient
.
feature_enabled?
(
:post_upload_pack
)
when
'info_refs'
when
'info_refs'
...
...
spec/lib/gitlab/workhorse_spec.rb
View file @
d56e4222
...
@@ -207,31 +207,33 @@ describe Gitlab::Workhorse, lib: true do
...
@@ -207,31 +207,33 @@ describe Gitlab::Workhorse, lib: true do
expect
(
subject
).
to
include
(
repo_param
)
expect
(
subject
).
to
include
(
repo_param
)
end
end
{
context
"when git_upload_pack action is passed"
do
git_receive_pack: :post_receive_pack
,
let
(
:action
)
{
'git_upload_pack'
}
git_upload_pack: :post_upload_pack
let
(
:feature_flag
)
{
:post_upload_pack
}
}.
each
do
|
action_name
,
feature_flag
|
context
"when
#{
action_name
}
action is passed"
do
context
'when action is enabled by feature flag'
do
let
(
:action
)
{
action_name
}
it
'includes Gitaly params in the returned value'
do
allow
(
Gitlab
::
GitalyClient
).
to
receive
(
:feature_enabled?
).
with
(
feature_flag
).
and_return
(
true
)
context
'when action is enabled by feature flag'
do
it
'includes Gitaly params in the returned value'
do
expect
(
subject
).
to
include
(
gitaly_params
)
allow
(
Gitlab
::
GitalyClient
).
to
receive
(
:feature_enabled?
).
with
(
feature_flag
).
and_return
(
true
)
expect
(
subject
).
to
include
(
gitaly_params
)
end
end
end
end
context
'when action is not enabled by feature flag'
do
context
'when action is not enabled by feature flag'
do
it
'does not include Gitaly params in the returned value'
do
it
'does not include Gitaly params in the returned value'
do
allow
(
Gitlab
::
GitalyClient
).
to
receive
(
:feature_enabled?
).
with
(
feature_flag
).
and_return
(
false
)
allow
(
Gitlab
::
GitalyClient
).
to
receive
(
:feature_enabled?
).
with
(
feature_flag
).
and_return
(
false
)
expect
(
subject
).
not_to
include
(
gitaly_params
)
expect
(
subject
).
not_to
include
(
gitaly_params
)
end
end
end
end
end
end
end
context
"when git_receive_pack action is passed"
do
let
(
:action
)
{
'git_receive_pack'
}
it
{
expect
(
subject
).
not_to
include
(
gitaly_params
)
}
end
context
"when info_refs action is passed"
do
context
"when info_refs action is passed"
do
let
(
:action
)
{
'info_refs'
}
let
(
:action
)
{
'info_refs'
}
...
...
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