BigW Consortium Gitlab

Commit 1c59ba67 by 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
let(:token) { current_application_settings.health_check_access_token }
let(:json_response) { JSON.parse(response.body) }
around do |example|
Dir.mktmpdir do |tmp_dir|
@metrics_multiproc_dir = tmp_dir
example.run
end
end
let(:metrics_multiproc_dir) { Dir.mktmpdir }
before do
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)
end
......
......@@ -281,15 +281,10 @@ describe Gitlab::Metrics do
end
context 'prometheus metrics enabled' do
around do |example|
Dir.mktmpdir do |tmp_dir|
@metrics_multiproc_dir = tmp_dir
example.run
end
end
let(:metrics_multiproc_dir) { Dir.mktmpdir }
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)
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