提交 35acc4cb 编写于 作者: J Jacob Vosmaer (GitLab) 提交者: Douwe Maan

Make Gitaly PostUploadPack mandatory

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册