Commit 1c59ba67 authored by Pawel Chojnacki's avatar Pawel Chojnacki

Do not cleanup temp directory as this apparently causes silent rspec failures on linux in CI

parent 4679107f
...@@ -5,17 +5,11 @@ describe MetricsController do ...@@ -5,17 +5,11 @@ describe MetricsController do
let(:token) { current_application_settings.health_check_access_token } let(:token) { current_application_settings.health_check_access_token }
let(:json_response) { JSON.parse(response.body) } let(:json_response) { JSON.parse(response.body) }
let(:metrics_multiproc_dir) { Dir.mktmpdir }
around do |example|
Dir.mktmpdir do |tmp_dir|
@metrics_multiproc_dir = tmp_dir
example.run
end
end
before do before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
stub_env('prometheus_multiproc_dir', @metrics_multiproc_dir) stub_env('prometheus_multiproc_dir', metrics_multiproc_dir)
allow(Gitlab::Metrics).to receive(:prometheus_metrics_enabled?).and_return(true) allow(Gitlab::Metrics).to receive(:prometheus_metrics_enabled?).and_return(true)
end end
......
...@@ -281,15 +281,10 @@ describe Gitlab::Metrics do ...@@ -281,15 +281,10 @@ describe Gitlab::Metrics do
end end
context 'prometheus metrics enabled' do context 'prometheus metrics enabled' do
around do |example| let(:metrics_multiproc_dir) { Dir.mktmpdir }
Dir.mktmpdir do |tmp_dir|
@metrics_multiproc_dir = tmp_dir
example.run
end
end
before do before do
stub_const('Prometheus::Client::Multiprocdir', @metrics_multiproc_dir) stub_const('Prometheus::Client::Multiprocdir', metrics_multiproc_dir)
allow(described_class).to receive(:prometheus_metrics_enabled?).and_return(true) allow(described_class).to receive(:prometheus_metrics_enabled?).and_return(true)
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