Commit d6fd0b03 authored by Stan Hu's avatar Stan Hu

Fix frontend fixtures failing when metrics dir does not exist

If `tmp/prometheus_multiproc_dir` did not exist,
`spec/frontend/fixtures/application_settings.rb` would attempt to
render a warning message with `prometheus_multiproc_dir` local
variable. Since this fixture didn't pass along this local variable,
the generation would fail with `undefined local variable or method`.

On some new installations, `tmp/prometheus_multiproc_dir` may not
exist. Since the fixture generation doesn't need this, we can just stub
the existence check to be `true` and move on with life.
parent 0245456e
...@@ -13,6 +13,7 @@ RSpec.describe Admin::ApplicationSettingsController, '(JavaScript fixtures)', ty ...@@ -13,6 +13,7 @@ RSpec.describe Admin::ApplicationSettingsController, '(JavaScript fixtures)', ty
before do before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
allow(Gitlab::Metrics).to receive(:metrics_folder_present?).and_return(true)
sign_in(admin) sign_in(admin)
enable_admin_mode!(admin) enable_admin_mode!(admin)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment