diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-05-10 12:29:55 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-05-10 12:29:55 +0300 |
commit | 05a6e2b866ded1a016f3182bb315cb9b5a016b5d (patch) | |
tree | b05c2e5cd9c6fb857213f904f2cec2d80e1d4cba /spec | |
parent | bdc1951dade31cabb2c28e1cdd0cec121f310d1b (diff) | |
parent | 5b584a0fd24ec80b5d8b7bdb0eb3f479208bf622 (diff) |
Merge branch 'backport-rd-5566-improve-performance-of-repository-size-limit-check' into 'master'
Backport some changes from gitlab-ee!5476
See merge request gitlab-org/gitlab-ce!18760
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/git/blob_spec.rb | 20 | ||||
-rw-r--r-- | spec/lib/gitlab/git/raw_diff_change_spec.rb | 2 |
2 files changed, 21 insertions, 1 deletions
diff --git a/spec/lib/gitlab/git/blob_spec.rb b/spec/lib/gitlab/git/blob_spec.rb index 67d898e787e..e2547ed0311 100644 --- a/spec/lib/gitlab/git/blob_spec.rb +++ b/spec/lib/gitlab/git/blob_spec.rb @@ -251,6 +251,26 @@ describe Gitlab::Git::Blob, seed_helper: true do end end + describe '.batch_metadata' do + let(:blob_references) do + [ + [SeedRepo::Commit::ID, "files/ruby/popen.rb"], + [SeedRepo::Commit::ID, 'six'] + ] + end + + subject { described_class.batch_metadata(repository, blob_references) } + + it 'returns an empty data attribute' do + first_blob, last_blob = subject + + expect(first_blob.data).to be_blank + expect(first_blob.path).to eq("files/ruby/popen.rb") + expect(last_blob.data).to be_blank + expect(last_blob.path).to eq("six") + end + end + describe '.batch_lfs_pointers' do let(:tree_object) { repository.rugged.rev_parse('master^{tree}') } diff --git a/spec/lib/gitlab/git/raw_diff_change_spec.rb b/spec/lib/gitlab/git/raw_diff_change_spec.rb index eedde34534f..a0bb37fd84a 100644 --- a/spec/lib/gitlab/git/raw_diff_change_spec.rb +++ b/spec/lib/gitlab/git/raw_diff_change_spec.rb @@ -12,7 +12,7 @@ describe Gitlab::Git::RawDiffChange do expect(change.operation).to eq(:unknown) expect(change.old_path).to be_blank expect(change.new_path).to be_blank - expect(change.blob_size).to be_blank + expect(change.blob_size).to eq(0) end end |