Commit 35acc4cb authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab) Committed by Douwe Maan

Make Gitaly PostUploadPack mandatory

parent 989bebbf
---
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment