summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2017-04-04 13:31:24 +0200
committerAhmad Sherif <me@ahmadsherif.com>2017-04-04 13:31:33 +0200
commitd56e4222573c791771b99bfbd655eecef301cf54 (patch)
treebda2ddc480cfbb4b30f5110f52c323b671694ab4 /spec
parent5f7ebfb9aa023849b8b296bf9cf0f472b886d072 (diff)
downloadgitlab-ce-d56e4222573c791771b99bfbd655eecef301cf54.tar.gz
Disable support for Gitaly PostReceivePackfix/disable-gitaly-post-receive-pack
See https://gitlab.com/gitlab-org/gitaly/issues/172
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/workhorse_spec.rb38
1 files changed, 20 insertions, 18 deletions
diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb
index 3bd2a3238fe..a5b7d9ad35f 100644
--- a/spec/lib/gitlab/workhorse_spec.rb
+++ b/spec/lib/gitlab/workhorse_spec.rb
@@ -207,31 +207,33 @@ 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 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
+ 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)
+
+ 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)
+ 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).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
let(:action) { 'info_refs' }