Skip to content
Snippets Groups Projects
Commit 543e66c6 authored by Bob Van Landuyt's avatar Bob Van Landuyt
Browse files

Update feature categories

These all seem to be related to the plan stage and coming from
gitlab-com/www-gitlab-com!90106
parent 48aeaa9f
No related branches found
No related tags found
1 merge request!73059Update feature categories
......@@ -174,7 +174,7 @@
it "pushes route's feature category to the context" do
expect(Gitlab::ApplicationContext).to receive(:push).with(
feature_category: 'issue_tracking'
feature_category: 'team_planning'
)
_, _, _ = middleware.call(build_request(path, if_none_match))
......
......@@ -116,14 +116,14 @@
context 'application context' do
context 'when a context is present' do
before do
::Gitlab::ApplicationContext.push(feature_category: 'issue_tracking', caller_id: 'IssuesController#show')
::Gitlab::ApplicationContext.push(feature_category: 'team_planning', caller_id: 'IssuesController#show')
end
it 'adds the feature category to the labels for required metrics' do
expect(described_class).to receive_message_chain(:http_requests_total, :increment).with(method: 'get', status: '200', feature_category: 'issue_tracking')
expect(described_class).to receive_message_chain(:http_requests_total, :increment).with(method: 'get', status: '200', feature_category: 'team_planning')
expect(described_class).not_to receive(:http_health_requests_total)
expect(Gitlab::Metrics::RailsSlis.request_apdex)
.to receive(:increment).with(labels: { feature_category: 'issue_tracking', endpoint_id: 'IssuesController#show', request_urgency: :default }, success: true)
.to receive(:increment).with(labels: { feature_category: 'team_planning', endpoint_id: 'IssuesController#show', request_urgency: :default }, success: true)
subject.call(env)
end
......@@ -141,12 +141,12 @@
context 'when application raises an exception when the feature category context is present' do
before do
::Gitlab::ApplicationContext.push(feature_category: 'issue_tracking')
::Gitlab::ApplicationContext.push(feature_category: 'team_planning')
allow(app).to receive(:call).and_raise(StandardError)
end
it 'adds the feature category to the labels for http_requests_total' do
expect(described_class).to receive_message_chain(:http_requests_total, :increment).with(method: 'get', status: 'undefined', feature_category: 'issue_tracking')
expect(described_class).to receive_message_chain(:http_requests_total, :increment).with(method: 'get', status: 'undefined', feature_category: 'team_planning')
expect(Gitlab::Metrics::RailsSlis).not_to receive(:request_apdex)
expect { subject.call(env) }.to raise_error(StandardError)
......
......@@ -11,7 +11,7 @@ def self.name
include ApplicationWorker
feature_category :issue_tracking
feature_category :team_planning
def self.job_for_args(args)
jobs.find { |job| job['args'] == args }
......@@ -78,8 +78,8 @@ def test_mail
job1 = TestWithContextWorker.job_for_args(['job1', 1, 2, 3])
job2 = TestWithContextWorker.job_for_args(['job2', 1, 2, 3])
expect(job1['meta.feature_category']).to eq('issue_tracking')
expect(job2['meta.feature_category']).to eq('issue_tracking')
expect(job1['meta.feature_category']).to eq('team_planning')
expect(job2['meta.feature_category']).to eq('team_planning')
end
it 'takes the feature category from the caller if the worker is not owned' do
......@@ -116,8 +116,8 @@ def test_mail
job1 = TestWithContextWorker.job_for_args(['job1', 1, 2, 3])
job2 = TestWithContextWorker.job_for_args(['job2', 1, 2, 3])
expect(job1['meta.feature_category']).to eq('issue_tracking')
expect(job2['meta.feature_category']).to eq('issue_tracking')
expect(job1['meta.feature_category']).to eq('team_planning')
expect(job2['meta.feature_category']).to eq('team_planning')
end
it 'takes the feature category from the caller if the worker is not owned' do
......
......@@ -116,7 +116,7 @@
'meta.root_namespace' => project.namespace.full_path,
'meta.user' => user.username,
'meta.client_id' => a_string_matching(%r{\Auser/.+}),
'meta.feature_category' => 'issue_tracking',
'meta.feature_category' => 'team_planning',
'route' => '/api/:version/projects/:id/issues')
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment