summaryrefslogtreecommitdiff
path: root/spec/db/production
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-06-06 13:16:55 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-06-06 13:16:55 +0200
commit4679107fdce6d88733c82329495b667d1a032217 (patch)
treec80f9714fb37357f182a02f58cde963bf4b61c9d /spec/db/production
parentd26573c6e3de535f69437deaf54d5c151ac343c8 (diff)
downloadgitlab-ce-4679107fdce6d88733c82329495b667d1a032217.tar.gz
Handle case where GITLAB_PROMETHEUS_METRICS_ENABLED is non boolean value by defaulting to false
Diffstat (limited to 'spec/db/production')
-rw-r--r--spec/db/production/settings_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/db/production/settings_spec.rb b/spec/db/production/settings_spec.rb
index 00c631b866e..a9d015e0666 100644
--- a/spec/db/production/settings_spec.rb
+++ b/spec/db/production/settings_spec.rb
@@ -42,5 +42,17 @@ describe 'seed production settings', lib: true do
expect(settings.prometheus_metrics_enabled).to eq(false)
end
end
+
+ context 'GITLAB_PROMETHEUS_METRICS_ENABLED is false' do
+ before do
+ stub_env('GITLAB_PROMETHEUS_METRICS_ENABLED', '')
+ end
+
+ it 'prometheus_metrics_enabled is set to false' do
+ load(settings_file)
+
+ expect(settings.prometheus_metrics_enabled).to eq(false)
+ end
+ end
end
end