Commit 17e96ea0 authored by alinamihaila's avatar alinamihaila

Include operational data when usage ping enabled

parent fe1cc091
......@@ -16,11 +16,11 @@ module EE
return [] unless product_intelligence_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|
categories << OPTIONAL_CATEGORY if optional_enabled
categories << OPERATIONAL_CATEGORY if operational_enabled
categories << OPERATIONAL_CATEGORY << OPTIONAL_CATEGORY if optional_enabled
categories << OPERATIONAL_CATEGORY if customer_service_enabled
end.to_set
end
......
......@@ -42,11 +42,7 @@ RSpec.describe ServicePing::BuildPayloadService do
end
it_behaves_like 'service ping payload with all expected metrics' do
let(:expected_metrics) { standard_metrics + subscription_metrics + optional_metrics }
end
it_behaves_like 'service ping payload without restricted metrics' do
let(:restricted_metrics) { operational_metrics }
let(:expected_metrics) { standard_metrics + subscription_metrics + optional_metrics + operational_metrics }
end
end
end
......
......@@ -62,7 +62,7 @@ RSpec.describe ServicePing::PermitDataCategoriesService do
end
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
......
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