Merge branch 'gitaly-post-upload-pack-mandatory' into 'master'
Make Gitaly PostUploadPack mandatory Closes gitaly#184 and gitaly#219 See merge request !13953
This commit is contained in:
commit
fd86a14241
3 changed files with 9 additions and 18 deletions
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Make Gitaly PostUploadPack mandatory
|
||||
merge_request: 13953
|
||||
author:
|
||||
type: changed
|
|
@ -35,10 +35,7 @@ module Gitlab
|
|||
when 'git_receive_pack'
|
||||
Gitlab::GitalyClient.feature_enabled?(:post_receive_pack)
|
||||
when 'git_upload_pack'
|
||||
Gitlab::GitalyClient.feature_enabled?(
|
||||
:post_upload_pack,
|
||||
status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT
|
||||
)
|
||||
true
|
||||
when 'info_refs'
|
||||
true
|
||||
else
|
||||
|
|
|
@ -228,21 +228,10 @@ describe Gitlab::Workhorse 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)
|
||||
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
|
||||
status_opt_out = Gitlab::GitalyClient::MigrationStatus::OPT_OUT
|
||||
allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(feature_flag, status: status_opt_out).and_return(false)
|
||||
|
||||
expect(subject).not_to include(gitaly_params)
|
||||
end
|
||||
expect(subject).to include(gitaly_params)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue