diff options
author | Stan Hu <stanhu@gmail.com> | 2017-08-06 21:46:38 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-08-06 21:51:42 -0700 |
commit | 5687bd24844b5a244b4888ae0f9e26c13aea720e (patch) | |
tree | 77f4ad2fe556b762845870d14de3c262f56cdb5c /spec/gitlab_shell_spec.rb | |
parent | 20896b6477be40d826b3aa391ff55698974cca61 (diff) | |
download | gitlab-shell-5687bd24844b5a244b4888ae0f9e26c13aea720e.tar.gz |
Fix SSH support for Git for Windows v2.14sh-fix-git-upload-pack
Git For Windows 2.14 has a patch that changes `git-upload-pack` to `git upload-pack`.
To make this work for gitlab-shell, just map this to `git-upload-pack`.
Closes gitlab-org/gitlab-ce#36028
Diffstat (limited to 'spec/gitlab_shell_spec.rb')
-rw-r--r-- | spec/gitlab_shell_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb index 6f4f363..8b72cdd 100644 --- a/spec/gitlab_shell_spec.rb +++ b/spec/gitlab_shell_spec.rb @@ -132,8 +132,8 @@ describe GitlabShell do describe :exec do let(:gitaly_message) { JSON.dump({ 'repository' => { 'relative_path' => repo_name, 'storage_name' => 'default' }, 'gl_repository' => gl_repository , 'gl_id' => key_id}) } - context 'git-upload-pack' do - let(:ssh_cmd) { "git-upload-pack gitlab-ci.git" } + shared_examples_for 'upload-pack' do |command| + let(:ssh_cmd) { "#{command} gitlab-ci.git" } after { subject.exec(ssh_cmd) } it "should process the command" do @@ -157,6 +157,14 @@ describe GitlabShell do end end + context 'git-upload-pack' do + it_behaves_like 'upload-pack', 'git-upload-pack' + end + + context 'git upload-pack' do + it_behaves_like 'upload-pack', 'git upload-pack' + end + context 'gitaly-upload-pack with GeoNode' do let(:ssh_cmd) { "git-upload-pack gitlab-ci.git" } let(:gitaly_check_access_with_geo) { GitAccessStatus.new(true, 'ok', gl_repository, repo_path, { 'repository' => { 'relative_path' => repo_name, 'storage_name' => 'default'} , 'address' => 'unix:gitaly.socket' }, true) } |