Commit 17e96ea0 authored by alinamihaila's avatar alinamihaila

Include operational data when usage ping enabled

parent fe1cc091
...@@ -16,11 +16,11 @@ module EE ...@@ -16,11 +16,11 @@ module EE
return [] unless product_intelligence_enabled? return [] unless product_intelligence_enabled?
optional_enabled = ::Gitlab::CurrentSettings.usage_ping_enabled? optional_enabled = ::Gitlab::CurrentSettings.usage_ping_enabled?
operational_enabled = ::License.current.usage_ping? customer_service_enabled = ::License.current.usage_ping?
[STANDARD_CATEGORY, SUBSCRIPTION_CATEGORY].tap do |categories| [STANDARD_CATEGORY, SUBSCRIPTION_CATEGORY].tap do |categories|
categories << OPTIONAL_CATEGORY if optional_enabled categories << OPERATIONAL_CATEGORY << OPTIONAL_CATEGORY if optional_enabled
categories << OPERATIONAL_CATEGORY if operational_enabled categories << OPERATIONAL_CATEGORY if customer_service_enabled
end.to_set end.to_set
end end
......
...@@ -42,11 +42,7 @@ RSpec.describe ServicePing::BuildPayloadService do ...@@ -42,11 +42,7 @@ RSpec.describe ServicePing::BuildPayloadService do
end end
it_behaves_like 'service ping payload with all expected metrics' do it_behaves_like 'service ping payload with all expected metrics' do
let(:expected_metrics) { standard_metrics + subscription_metrics + optional_metrics } let(:expected_metrics) { standard_metrics + subscription_metrics + optional_metrics + operational_metrics }
end
it_behaves_like 'service ping payload without restricted metrics' do
let(:restricted_metrics) { operational_metrics }
end end
end end
end end
......
...@@ -62,7 +62,7 @@ RSpec.describe ServicePing::PermitDataCategoriesService do ...@@ -62,7 +62,7 @@ RSpec.describe ServicePing::PermitDataCategoriesService do
end end
it 'returns all categories' do it 'returns all categories' do
expect(permitted_categories).to match_array(%w[Standard Subscription Optional]) expect(permitted_categories).to match_array(%w[Standard Subscription Operational Optional])
end end
end end
end 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