diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-09-01 08:45:19 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-09-01 08:45:19 +0000 |
commit | fd86a142416fb0b760f8247dbd6dbec6b7cc6a32 (patch) | |
tree | 83fd86d640af8cf9579f24334bace423dceef759 | |
parent | 989bebbf017f4eb7e708d446c22be6b01cffcc21 (diff) | |
parent | 35acc4cbbebee9a3e4f876675fcd45bdc3f49d77 (diff) | |
download | gitlab-ce-fd86a142416fb0b760f8247dbd6dbec6b7cc6a32.tar.gz |
Merge branch 'gitaly-post-upload-pack-mandatory' into 'master'
Make Gitaly PostUploadPack mandatory
Closes gitaly#184 and gitaly#219
See merge request !13953
-rw-r--r-- | changelogs/unreleased/gitaly-post-upload-pack-mandatory.yml | 5 | ||||
-rw-r--r-- | lib/gitlab/workhorse.rb | 5 | ||||
-rw-r--r-- | spec/lib/gitlab/workhorse_spec.rb | 17 |
3 files changed, 9 insertions, 18 deletions
diff --git a/changelogs/unreleased/gitaly-post-upload-pack-mandatory.yml b/changelogs/unreleased/gitaly-post-upload-pack-mandatory.yml new file mode 100644 index 00000000000..edf11484d1f --- /dev/null +++ b/changelogs/unreleased/gitaly-post-upload-pack-mandatory.yml @@ -0,0 +1,5 @@ +--- +title: Make Gitaly PostUploadPack mandatory +merge_request: 13953 +author: +type: changed diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index a362a3a0bc6..e5ad9b5a40c 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -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 diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb index b66afafa174..699184ad9fe 100644 --- a/spec/lib/gitlab/workhorse_spec.rb +++ b/spec/lib/gitlab/workhorse_spec.rb @@ -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 |