diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 00:08:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 00:08:01 +0300 |
commit | 95ad46159e4cd93f2b31838199180d824e041994 (patch) | |
tree | d41880d3b6a0093463694978590e590efb08caef /spec/lib/gitlab/gitaly_client | |
parent | 2c72daf2f1744f2b8c8c6674c266907e9ef55558 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/gitaly_client')
-rw-r--r-- | spec/lib/gitlab/gitaly_client/praefect_info_service_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client/praefect_info_service_spec.rb b/spec/lib/gitlab/gitaly_client/praefect_info_service_spec.rb new file mode 100644 index 00000000000..9b5c751e0ec --- /dev/null +++ b/spec/lib/gitlab/gitaly_client/praefect_info_service_spec.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Gitlab::GitalyClient::PraefectInfoService do + let(:project) { create(:project, :repository) } + let(:repository) { project.repository } + let(:gitaly_repository) { repository.gitaly_repository } + let(:client) { described_class.new(repository) } + + describe '#repository_replicas', :praefect do + it 'sends an RPC request' do + request = Gitaly::RepositoryReplicasRequest.new(repository: gitaly_repository) + + expect_any_instance_of(Gitaly::PraefectInfoService::Stub).to receive(:repository_replicas).with(request, kind_of(Hash)) + + client.replicas + end + end +end |