Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-06-05 18:58:28 +0300
committerJacob Vosmaer <jacob@gitlab.com>2018-06-12 15:33:37 +0300
commitf376347f24f24efc157d80de63381dd22d060630 (patch)
tree73dc59fbab206b2c5e79e6144b4d02c931da92a0 /spec/lib/gitlab/git/blob_spec.rb
parentb2ef7f6cd9b98681aeb2274e29f0b3aaac423fc9 (diff)
Find and mark more Git disk access locations, part 2
Diffstat (limited to 'spec/lib/gitlab/git/blob_spec.rb')
-rw-r--r--spec/lib/gitlab/git/blob_spec.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/spec/lib/gitlab/git/blob_spec.rb b/spec/lib/gitlab/git/blob_spec.rb
index 94eaf86ef80..6015086f002 100644
--- a/spec/lib/gitlab/git/blob_spec.rb
+++ b/spec/lib/gitlab/git/blob_spec.rb
@@ -149,7 +149,9 @@ describe Gitlab::Git::Blob, seed_helper: true do
it 'limits the size of a large file' do
blob_size = Gitlab::Git::Blob::MAX_DATA_DISPLAY_SIZE + 1
buffer = Array.new(blob_size, 0)
- rugged_blob = Rugged::Blob.from_buffer(repository.rugged, buffer.join(''))
+ rugged_blob = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
+ Rugged::Blob.from_buffer(repository.rugged, buffer.join(''))
+ end
blob = Gitlab::Git::Blob.raw(repository, rugged_blob)
expect(blob.size).to eq(blob_size)
@@ -164,7 +166,9 @@ describe Gitlab::Git::Blob, seed_helper: true do
context 'when sha references a tree' do
it 'returns nil' do
- tree = repository.rugged.rev_parse('master^{tree}')
+ tree = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
+ repository.rugged.rev_parse('master^{tree}')
+ end
blob = Gitlab::Git::Blob.raw(repository, tree.oid)
@@ -278,7 +282,11 @@ describe Gitlab::Git::Blob, seed_helper: true do
end
describe '.batch_lfs_pointers' do
- let(:tree_object) { repository.rugged.rev_parse('master^{tree}') }
+ let(:tree_object) do
+ Gitlab::GitalyClient::StorageSettings.allow_disk_access do
+ repository.rugged.rev_parse('master^{tree}')
+ end
+ end
let(:non_lfs_blob) do
Gitlab::Git::Blob.find(