summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-06-22 01:00:30 +0000
committerRobert Speicher <robert@gitlab.com>2017-06-22 01:00:30 +0000
commitf85d0a00240585e2cc1cf0b79e033bd22cb44e32 (patch)
tree8eb59db3b9dcc0ae2402bd481fd6c857b1d45760 /spec/lib
parentdb9a8f4e3257104937d4558cd25ccbd345914a73 (diff)
parent0284f01716cfdcbe8d9e7a0281e551414b4c0239 (diff)
downloadgitlab-ce-f85d0a00240585e2cc1cf0b79e033bd22cb44e32.tar.gz
Merge branch 'feature/migrate-blob-find-to-gitaly' into 'master'
Migrate Gitlab::Git::Blob.find to Gitaly See merge request !12104
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/git/blob_spec.rb12
-rw-r--r--spec/lib/gitlab/workhorse_spec.rb1
2 files changed, 11 insertions, 2 deletions
diff --git a/spec/lib/gitlab/git/blob_spec.rb b/spec/lib/gitlab/git/blob_spec.rb
index 5b8648392b9..58d3ee6b488 100644
--- a/spec/lib/gitlab/git/blob_spec.rb
+++ b/spec/lib/gitlab/git/blob_spec.rb
@@ -15,7 +15,7 @@ describe Gitlab::Git::Blob, seed_helper: true do
end
end
- describe '.find' do
+ shared_examples 'finding blobs' do
context 'file in subdir' do
let(:blob) { Gitlab::Git::Blob.find(repository, SeedRepo::Commit::ID, "files/ruby/popen.rb") }
@@ -101,6 +101,16 @@ describe Gitlab::Git::Blob, seed_helper: true do
end
end
+ describe '.find' do
+ context 'when project_raw_show Gitaly feature is enabled' do
+ it_behaves_like 'finding blobs'
+ end
+
+ context 'when project_raw_show Gitaly feature is disabled', skip_gitaly_mock: true do
+ it_behaves_like 'finding blobs'
+ end
+ end
+
describe '.raw' do
let(:raw_blob) { Gitlab::Git::Blob.raw(repository, SeedRepo::RubyBlob::ID) }
it { expect(raw_blob.id).to eq(SeedRepo::RubyBlob::ID) }
diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb
index a3e8166cb70..493ff3bb5fb 100644
--- a/spec/lib/gitlab/workhorse_spec.rb
+++ b/spec/lib/gitlab/workhorse_spec.rb
@@ -216,7 +216,6 @@ describe Gitlab::Workhorse, lib: true do
it 'includes a Repository param' do
repo_param = { Repository: {
- path: '', # deprecated field; grpc automatically creates it anyway
storage_name: 'default',
relative_path: project.full_path + '.git'
} }