summaryrefslogtreecommitdiff
path: root/spec/models/project_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-17 03:09:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-17 03:09:27 +0000
commit9345f69894862e02f3491ea3136c3ed2b23fd5b8 (patch)
tree08a4a1b2861cd5894e2a1146300a206071f06ea3 /spec/models/project_spec.rb
parentd43aaf286fe6b8e8383e73ea580274d8841608d7 (diff)
downloadgitlab-ce-9345f69894862e02f3491ea3136c3ed2b23fd5b8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 2c6cfce7247..ae97e5340e2 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -1401,6 +1401,22 @@ describe Project do
expect(project.repository_storage).to eq('picked')
end
+
+ it 'picks from the latest available storage', :request_store do
+ stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
+ Gitlab::CurrentSettings.current_application_settings
+
+ settings = ApplicationSetting.last
+ settings.repository_storages = %w(picked)
+ settings.save!
+
+ expect(Gitlab::CurrentSettings.repository_storages).to eq(%w(default))
+
+ project
+
+ expect(project.repository.storage).to eq('picked')
+ expect(Gitlab::CurrentSettings.repository_storages).to eq(%w(picked))
+ end
end
context 'shared runners by default' do