summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-06-06 15:21:13 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-06-06 15:26:20 +0200
commit51a9f71118e9cd4bec50b6a5872d035f219e4eaf (patch)
tree72fcd5dfee54d9014cabb2a5f76f427fbcb59b91
parente6568d806d85b74c75fc37f1afc7c01c139818ba (diff)
downloadgitlab-ce-51a9f71118e9cd4bec50b6a5872d035f219e4eaf.tar.gz
Add a custom storage config instead of overwriting
Otherwise the ApplicationSetting that is currently stored would be invalid as it specifies a storage that is not configured
-rw-r--r--spec/requests/api/settings_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb
index aead8978dd4..57adc3ca7a6 100644
--- a/spec/requests/api/settings_spec.rb
+++ b/spec/requests/api/settings_spec.rb
@@ -35,7 +35,9 @@ describe API::Settings, 'Settings' do
context "custom repository storage type set in the config" do
before do
- storages = { 'custom' => 'tmp/tests/custom_repositories' }
+ # Add a possible storage to the config
+ storages = Gitlab.config.repositories.storages
+ .merge({ 'custom' => 'tmp/tests/custom_repositories' })
allow(Gitlab.config.repositories).to receive(:storages).and_return(storages)
end