diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-11-01 14:25:51 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-11-01 14:25:51 +0300 |
commit | b6e69673fdb9083f3e57a5ce0bbd101e603d21c1 (patch) | |
tree | 6151e3768649c77ac45fc0bb77cda8d0b0972dc3 /spec | |
parent | 466b7763236ca22ea87540063a10545467fa77b7 (diff) | |
parent | 527f87dfdb16b3ef3aa772002667a6f5c1acce48 (diff) |
Merge branch 'backport-workhorse-show-all-refs' into 'master'
Support show-all-refs for git over HTTP
See merge request gitlab-org/gitlab-ce!14834
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/workhorse_spec.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb index 80bf7986ee0..249c77dc636 100644 --- a/spec/lib/gitlab/workhorse_spec.rb +++ b/spec/lib/gitlab/workhorse_spec.rb @@ -268,7 +268,8 @@ describe Gitlab::Workhorse do GL_ID: "user-#{user.id}", GL_USERNAME: user.username, GL_REPOSITORY: "project-#{project.id}", - RepoPath: repo_path + RepoPath: repo_path, + ShowAllRefs: false } end @@ -282,7 +283,8 @@ describe Gitlab::Workhorse do GL_ID: "user-#{user.id}", GL_USERNAME: user.username, GL_REPOSITORY: "wiki-#{project.id}", - RepoPath: repo_path + RepoPath: repo_path, + ShowAllRefs: false } end @@ -324,6 +326,12 @@ describe Gitlab::Workhorse do expect(subject).to include(gitaly_params) end + + context 'show_all_refs enabled' do + subject { described_class.git_http_ok(repository, false, user, action, show_all_refs: true) } + + it { is_expected.to include(ShowAllRefs: true) } + end end context "when git_receive_pack action is passed" do @@ -336,6 +344,12 @@ describe Gitlab::Workhorse do let(:action) { 'info_refs' } it { expect(subject).to include(gitaly_params) } + + context 'show_all_refs enabled' do + subject { described_class.git_http_ok(repository, false, user, action, show_all_refs: true) } + + it { is_expected.to include(ShowAllRefs: true) } + end end context 'when action passed is not supported by Gitaly' do |