diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-03 00:06:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-03 00:06:22 +0300 |
commit | 6d60f910762c1a92a07a4afaf1b26962f75ee4b6 (patch) | |
tree | 0a9ef6ccb20aa2099df33a409723eb912f8029e3 /spec/lib/gitlab/metrics | |
parent | de2ae3154f4ba1c23eeaa4ace41177ecd9b6005a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/metrics')
-rw-r--r-- | spec/lib/gitlab/metrics/requests_rack_middleware_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/metrics/requests_rack_middleware_spec.rb b/spec/lib/gitlab/metrics/requests_rack_middleware_spec.rb index c29db3a93ec..66ea390a2bf 100644 --- a/spec/lib/gitlab/metrics/requests_rack_middleware_spec.rb +++ b/spec/lib/gitlab/metrics/requests_rack_middleware_spec.rb @@ -63,5 +63,19 @@ describe Gitlab::Metrics::RequestsRackMiddleware do expect { subject.call(env) }.to raise_error(StandardError) end end + + describe '.initialize_http_request_duration_seconds' do + it "sets labels" do + expected_labels = [] + described_class::HTTP_METHODS.each do |method, statuses| + statuses.each do |status| + expected_labels << { method: method, status: status } + end + end + + described_class.initialize_http_request_duration_seconds + expect(described_class.http_request_duration_seconds.values.keys).to include(*expected_labels) + end + end end end |