diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /spec/commands/metrics_server | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'spec/commands/metrics_server')
-rw-r--r-- | spec/commands/metrics_server/metrics_server_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/commands/metrics_server/metrics_server_spec.rb b/spec/commands/metrics_server/metrics_server_spec.rb index f3936e6b346..b755801bb65 100644 --- a/spec/commands/metrics_server/metrics_server_spec.rb +++ b/spec/commands/metrics_server/metrics_server_spec.rb @@ -23,6 +23,8 @@ RSpec.describe 'bin/metrics-server', :aggregate_failures do end context 'with a running server' do + let(:metrics_dir) { Dir.mktmpdir } + before do # We need to send a request to localhost WebMock.allow_net_connect! @@ -33,7 +35,8 @@ RSpec.describe 'bin/metrics-server', :aggregate_failures do env = { 'GITLAB_CONFIG' => config_file.path, 'METRICS_SERVER_TARGET' => 'sidekiq', - 'WIPE_METRICS_DIR' => '1' + 'WIPE_METRICS_DIR' => '1', + 'prometheus_multiproc_dir' => metrics_dir } @pid = Process.spawn(env, 'bin/metrics-server', pgroup: true) end @@ -55,6 +58,7 @@ RSpec.describe 'bin/metrics-server', :aggregate_failures do # 'No such process' means the process died before ensure config_file.unlink + FileUtils.rm_rf(metrics_dir, secure: true) end it 'serves /metrics endpoint' do |