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
path: root/spec
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-08-23 20:42:40 +0300
committerLin Jen-Shin <godfat@godfat.org>2019-08-23 20:42:40 +0300
commite84922906e51b22f2f335ebaa4390ccac2e4caf8 (patch)
treed8e797d2dc04b62e005fa2276029b73dec5d9a04 /spec
parent15ea614765ce88a93c91a3b055a7c4fb96fd1ccb (diff)
parentebbd2aeb5f56bc2cacc5d95d41da370d8c29069d (diff)
Merge branch 'jc-fix-auto-rugged-detection' into 'master'
Handle when server info doesn't have the storage in question See merge request gitlab-org/gitlab-ce!32023
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/gitaly_client_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client_spec.rb b/spec/lib/gitlab/gitaly_client_spec.rb
index e9fb6c0125c..99d563e03ec 100644
--- a/spec/lib/gitlab/gitaly_client_spec.rb
+++ b/spec/lib/gitlab/gitaly_client_spec.rb
@@ -27,6 +27,16 @@ describe Gitlab::GitalyClient do
end
end
+ describe '.filesystem_id' do
+ it 'returns an empty string when the storage is not found in the response' do
+ response = double("response")
+ allow(response).to receive(:storage_statuses).and_return([])
+ allow_any_instance_of(Gitlab::GitalyClient::ServerService).to receive(:info).and_return(response)
+
+ expect(described_class.filesystem_id('default')).to eq(nil)
+ end
+ end
+
describe '.stub_class' do
it 'returns the gRPC health check stub' do
expect(described_class.stub_class(:health_check)).to eq(::Grpc::Health::V1::Health::Stub)