summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-04-03 14:40:17 +0000
committerRobert Speicher <robert@gitlab.com>2017-04-03 14:40:17 +0000
commitb23b76d8eb182ccc57beee37340ff3c5b726dd9b (patch)
tree39da7f8ec83afe9e1f5e7a3ccb89847d19850961 /spec
parent41396031162ab62cfac2837acdfcc200e74fda73 (diff)
parent13487809c7fd9994f14babf3e189b434f61692ca (diff)
downloadgitlab-ce-b23b76d8eb182ccc57beee37340ff3c5b726dd9b.tar.gz
Merge branch 'workhorse-gitaly-repository' into 'master'
Pass Gitaly 'Repository' messages to workhorse for Git HTTP Closes gitaly#148 See merge request !10343
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/workhorse_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb
index 535c96eeee9..cb7c810124e 100644
--- a/spec/lib/gitlab/workhorse_spec.rb
+++ b/spec/lib/gitlab/workhorse_spec.rb
@@ -179,10 +179,11 @@ describe Gitlab::Workhorse, lib: true do
describe '.git_http_ok' do
let(:user) { create(:user) }
+ let(:repo_path) { repository.path_to_repo }
subject { described_class.git_http_ok(repository, user) }
- it { expect(subject).to eq({ GL_ID: "user-#{user.id}", RepoPath: repository.path_to_repo }) }
+ it { expect(subject).to eq({ GL_ID: "user-#{user.id}", RepoPath: repo_path }) }
context 'when Gitaly is enabled' do
before do
@@ -192,6 +193,11 @@ describe Gitlab::Workhorse, lib: true do
it 'includes Gitaly params in the returned value' do
gitaly_socket_path = URI(Gitlab::GitalyClient.get_address('default')).path
expect(subject).to include({ GitalySocketPath: gitaly_socket_path })
+ expect(subject[:Repository]).to include({
+ path: repo_path,
+ storage_name: 'default',
+ relative_path: project.full_path + '.git',
+ })
end
end
end