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>2020-06-18 14:18:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/lib/gitaly
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/lib/gitaly')
-rw-r--r--spec/lib/gitaly/server_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/lib/gitaly/server_spec.rb b/spec/lib/gitaly/server_spec.rb
index 5142f705251..390855b30ad 100644
--- a/spec/lib/gitaly/server_spec.rb
+++ b/spec/lib/gitaly/server_spec.rb
@@ -20,6 +20,7 @@ describe Gitaly::Server do
it { is_expected.to respond_to(:git_binary_version) }
it { is_expected.to respond_to(:up_to_date?) }
it { is_expected.to respond_to(:address) }
+ it { is_expected.to respond_to(:replication_factor) }
describe 'readable?' do
context 'when the storage is readable' do
@@ -134,4 +135,22 @@ describe Gitaly::Server do
end
end
end
+
+ describe 'replication_factor' do
+ context 'when examining for a given server' do
+ let(:storage_status) { double('storage_status', storage_name: 'default') }
+
+ before do
+ response = double('response', storage_statuses: [storage_status])
+ allow_next_instance_of(Gitlab::GitalyClient::ServerService) do |instance|
+ allow(instance).to receive(:info).and_return(response)
+ end
+ end
+
+ it do
+ allow(storage_status).to receive(:replication_factor).and_return(2)
+ expect(server.replication_factor).to eq(2)
+ end
+ end
+ end
end