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:
authorSean McGivern <sean@mcgivern.me.uk>2018-04-16 12:17:29 +0300
committerSean McGivern <sean@mcgivern.me.uk>2018-04-16 12:17:29 +0300
commitbcaba662e503af979a3a3b68a53d753cb6d930ee (patch)
treeca6b53a1c0b0787becb0508890370b9e105a88db
parent551f146e8f8def4cc83edd6721e96b26d4c15ef8 (diff)
parent4dbc309b9e128413ffe1b5a3198cbfe22d0bce41 (diff)
Merge branch '45278-failing-current_settings_spec-rb-on-master-when-env-in_memory_application_settings-is-true-returns-an-in-memory-applicationsetting-object' into 'master'
Resolve "Failing current_settings_spec.rb on master (when ENV["IN_MEMORY_APPLICATION_SETTINGS"] is true returns an in-memory ApplicationSetting object)" Closes #45278 See merge request gitlab-org/gitlab-ce!18388
-rw-r--r--spec/db/production/settings_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/db/production/settings_spec.rb b/spec/db/production/settings_spec.rb
index 79e67330854..c8d016070f5 100644
--- a/spec/db/production/settings_spec.rb
+++ b/spec/db/production/settings_spec.rb
@@ -2,10 +2,15 @@ require 'spec_helper'
require 'rainbow/ext/string'
describe 'seed production settings' do
- include StubENV
let(:settings_file) { Rails.root.join('db/fixtures/production/010_settings.rb') }
let(:settings) { Gitlab::CurrentSettings.current_application_settings }
+ before do
+ # It's important to set this variable so that we don't save a memoized
+ # (supposed to be) in-memory record in `Gitlab::CurrentSettings.in_memory_application_settings`
+ stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
+ end
+
context 'GITLAB_SHARED_RUNNERS_REGISTRATION_TOKEN is set in the environment' do
before do
stub_env('GITLAB_SHARED_RUNNERS_REGISTRATION_TOKEN', '013456789')