diff options
author | Robert Speicher <robert@gitlab.com> | 2017-06-22 04:00:30 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-06-22 04:00:30 +0300 |
commit | f85d0a00240585e2cc1cf0b79e033bd22cb44e32 (patch) | |
tree | 8eb59db3b9dcc0ae2402bd481fd6c857b1d45760 /spec/lib | |
parent | db9a8f4e3257104937d4558cd25ccbd345914a73 (diff) | |
parent | 0284f01716cfdcbe8d9e7a0281e551414b4c0239 (diff) |
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.rb | 12 | ||||
-rw-r--r-- | spec/lib/gitlab/workhorse_spec.rb | 1 |
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' } } |