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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 16:18:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 16:18:24 +0300
commit0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch)
tree4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /spec/lib/gitlab/gitaly_client/blob_service_spec.rb
parent744144d28e3e7fddc117924fef88de5d9674fe4c (diff)
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'spec/lib/gitlab/gitaly_client/blob_service_spec.rb')
-rw-r--r--spec/lib/gitlab/gitaly_client/blob_service_spec.rb23
1 files changed, 21 insertions, 2 deletions
diff --git a/spec/lib/gitlab/gitaly_client/blob_service_spec.rb b/spec/lib/gitlab/gitaly_client/blob_service_spec.rb
index 50078d8c127..f869c66337e 100644
--- a/spec/lib/gitlab/gitaly_client/blob_service_spec.rb
+++ b/spec/lib/gitlab/gitaly_client/blob_service_spec.rb
@@ -92,13 +92,14 @@ RSpec.describe Gitlab::GitalyClient::BlobService do
describe '#list_blobs' do
let(:limit) { 0 }
let(:bytes_limit) { 0 }
- let(:expected_params) { { revisions: revisions, limit: limit, bytes_limit: bytes_limit } }
+ let(:with_paths) { false }
+ let(:expected_params) { { revisions: revisions, limit: limit, bytes_limit: bytes_limit, with_paths: with_paths } }
before do
::Gitlab::GitalyClient.clear_stubs!
end
- subject { client.list_blobs(revisions, limit: limit, bytes_limit: bytes_limit) }
+ subject { client.list_blobs(revisions, limit: limit, bytes_limit: bytes_limit, with_paths: with_paths) }
context 'with a single revision' do
let(:revisions) { ['master'] }
@@ -147,6 +148,24 @@ RSpec.describe Gitlab::GitalyClient::BlobService do
end
end
+ context 'with paths' do
+ let(:revisions) { ['master'] }
+ let(:limit) { 10 }
+ let(:bytes_lmit) { 1024 }
+ let(:with_paths) { true }
+
+ it 'sends a list_blobs message' do
+ expect_next_instance_of(Gitaly::BlobService::Stub) do |service|
+ expect(service)
+ .to receive(:list_blobs)
+ .with(gitaly_request_with_params(expected_params), kind_of(Hash))
+ .and_return([])
+ end
+
+ subject
+ end
+ end
+
context 'with split contents' do
let(:revisions) { ['master'] }