diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/lib/prometheus | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/lib/prometheus')
-rw-r--r-- | spec/lib/prometheus/pid_provider_spec.rb | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/spec/lib/prometheus/pid_provider_spec.rb b/spec/lib/prometheus/pid_provider_spec.rb index f1d7f2ffff5..9fdca2662e7 100644 --- a/spec/lib/prometheus/pid_provider_spec.rb +++ b/spec/lib/prometheus/pid_provider_spec.rb @@ -28,66 +28,6 @@ RSpec.describe Prometheus::PidProvider do end end - context 'when running in Unicorn mode' do - before do - allow(Gitlab::Runtime).to receive(:unicorn?).and_return(true) - - expect(described_class).to receive(:process_name) - .at_least(:once) - .and_return(process_name) - end - - context 'when unicorn master is specified in process name' do - context 'when running in Omnibus' do - context 'before the process was renamed' do - let(:process_name) { "/opt/gitlab/embedded/bin/unicorn"} - - it { is_expected.to eq 'unicorn_master' } - end - - context 'after the process was renamed' do - let(:process_name) { "unicorn master -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru" } - - it { is_expected.to eq 'unicorn_master' } - end - end - - context 'when in development env' do - context 'before the process was renamed' do - let(:process_name) { "path_to_bindir/bin/unicorn_rails"} - - it { is_expected.to eq 'unicorn_master' } - end - - context 'after the process was renamed' do - let(:process_name) { "unicorn_rails master -c /gitlab_dir/config/unicorn.rb -E development" } - - it { is_expected.to eq 'unicorn_master' } - end - end - end - - context 'when unicorn worker id is specified in process name' do - context 'when running in Omnibus' do - let(:process_name) { "unicorn worker[1] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru" } - - it { is_expected.to eq 'unicorn_1' } - end - - context 'when in development env' do - let(:process_name) { "unicorn_rails worker[1] -c gitlab_dir/config/unicorn.rb -E development" } - - it { is_expected.to eq 'unicorn_1' } - end - end - - context 'when no specified unicorn master or worker id in process name' do - let(:process_name) { "bin/unknown_process"} - - it { is_expected.to eq "process_#{Process.pid}" } - end - end - context 'when running in Puma mode' do before do allow(Gitlab::Runtime).to receive(:puma?).and_return(true) |