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:
authorJacob Vosmaer <jacob@gitlab.com>2018-03-14 16:42:49 +0300
committerJacob Vosmaer <jacob@gitlab.com>2018-03-21 20:18:32 +0300
commit008a6a6ce6fa943adcfecf3a606b845cfa282680 (patch)
treef98536d22e41415cb93a3e729ff49519cd37a13a /spec/support
parentb3daf108aacc4ae363283d46395fe853fa06cccb (diff)
Route path lookups through legacy_disk_path
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/stored_repositories.rb2
-rw-r--r--spec/support/stub_configuration.rb8
-rw-r--r--spec/support/test_env.rb2
3 files changed, 8 insertions, 4 deletions
diff --git a/spec/support/stored_repositories.rb b/spec/support/stored_repositories.rb
index 52e47ae2d34..21995c89a6e 100644
--- a/spec/support/stored_repositories.rb
+++ b/spec/support/stored_repositories.rb
@@ -4,7 +4,7 @@ RSpec.configure do |config|
end
config.before(:all, :broken_storage) do
- FileUtils.rm_rf Gitlab.config.repositories.storages.broken['path']
+ FileUtils.rm_rf Gitlab.config.repositories.storages.broken.legacy_disk_path
end
config.before(:each, :broken_storage) do
diff --git a/spec/support/stub_configuration.rb b/spec/support/stub_configuration.rb
index 9f08c139322..bad1d34df3a 100644
--- a/spec/support/stub_configuration.rb
+++ b/spec/support/stub_configuration.rb
@@ -50,8 +50,12 @@ module StubConfiguration
# Default storage is always required
messages['default'] ||= Gitlab.config.repositories.storages.default
- messages.each do |storage_name, storage_settings|
- storage_settings['path'] = TestEnv.repos_path unless storage_settings.key?('path')
+ messages.each do |storage_name, storage_hash|
+ if !storage_hash.key?('path') || storage_hash['path'] == Gitlab::GitalyClient::StorageSettings::Deprecated
+ storage_hash['path'] = TestEnv.repos_path
+ end
+
+ messages[storage_name] = Gitlab::GitalyClient::StorageSettings.new(storage_hash.to_h)
end
allow(Gitlab.config.repositories).to receive(:storages).and_return(Settingslogic.new(messages))
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb
index 01321989f01..f14e69b1041 100644
--- a/spec/support/test_env.rb
+++ b/spec/support/test_env.rb
@@ -225,7 +225,7 @@ module TestEnv
end
def repos_path
- Gitlab.config.repositories.storages.default['path']
+ Gitlab.config.repositories.storages.default.legacy_disk_path
end
def backup_path