diff options
author | Stan Hu <stanhu@gmail.com> | 2017-07-27 15:57:28 -0500 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-08-03 10:08:32 -0700 |
commit | 8139fe23dc8bef424a7a408bf3329038a883f5fb (patch) | |
tree | f355df2a04cc241e9a70faf6725ba83f8c547fff /spec/gitlab_shell_spec.rb | |
parent | 5c2fee4d0aeb32e677fb47d75c2d7a6b8bb0f5e6 (diff) | |
download | gitlab-shell-8139fe23dc8bef424a7a408bf3329038a883f5fb.tar.gz |
Use git_config_options instead of git_config_parameters for Gitaly requestssh-support-gitaly-upload-pack-unhide-refs
Diffstat (limited to 'spec/gitlab_shell_spec.rb')
-rw-r--r-- | spec/gitlab_shell_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb index 87389b4..6f4f363 100644 --- a/spec/gitlab_shell_spec.rb +++ b/spec/gitlab_shell_spec.rb @@ -157,6 +157,18 @@ describe GitlabShell do end 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) } + let(:gitaly_message_with_all_refs) { JSON.dump({ 'repository' => { 'relative_path' => repo_name, 'storage_name' => 'default' }, 'gl_repository' => gl_repository , 'gl_id' => key_id, 'git_config_options' => [GitlabShell::GIT_CONFIG_SHOW_ALL_REFS]}) } + before { api.stub(check_access: gitaly_check_access_with_geo) } + after { subject.exec(ssh_cmd) } + + it "should execute the command with unhiding refs" do + subject.should_receive(:exec_cmd).with(File.join(ROOT_PATH, "bin/gitaly-upload-pack"), 'unix:gitaly.socket', gitaly_message_with_all_refs) + end + end + context 'gitaly-upload-pack' do let(:ssh_cmd) { "git-upload-pack gitlab-ci.git" } before { |