Disable support for Gitaly PostReceivePack
See https://gitlab.com/gitlab-org/gitaly/issues/172
This commit is contained in:
parent
5f7ebfb9aa
commit
d56e422257
|
@ -35,7 +35,8 @@ module Gitlab
|
|||
|
||||
feature_enabled = case action.to_s
|
||||
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'
|
||||
Gitlab::GitalyClient.feature_enabled?(:post_upload_pack)
|
||||
when 'info_refs'
|
||||
|
|
|
@ -207,29 +207,31 @@ describe Gitlab::Workhorse, lib: true do
|
|||
expect(subject).to include(repo_param)
|
||||
end
|
||||
|
||||
{
|
||||
git_receive_pack: :post_receive_pack,
|
||||
git_upload_pack: :post_upload_pack
|
||||
}.each do |action_name, feature_flag|
|
||||
context "when #{action_name} action is passed" do
|
||||
let(:action) { action_name }
|
||||
context "when git_upload_pack action is passed" do
|
||||
let(:action) { 'git_upload_pack' }
|
||||
let(:feature_flag) { :post_upload_pack }
|
||||
|
||||
context 'when action is enabled by feature flag' do
|
||||
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
|
||||
allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(feature_flag).and_return(true)
|
||||
|
||||
expect(subject).to include(gitaly_params)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when action is not enabled by feature flag' 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)
|
||||
|
||||
expect(subject).not_to include(gitaly_params)
|
||||
end
|
||||
expect(subject).to include(gitaly_params)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when action is not enabled by feature flag' 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)
|
||||
|
||||
expect(subject).not_to include(gitaly_params)
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue