Commit 4cce4fce authored by Stan Hu's avatar Stan Hu

Merge branch 'add_feature_flags_to_usage_ping' into 'master'

Adding Feature Flags to Usage Ping

See merge request gitlab-org/gitlab-ee!9475
parents eb2fb9ad 82d60209
...@@ -108,6 +108,7 @@ module EE ...@@ -108,6 +108,7 @@ module EE
usage_data[:counts] = usage_data[:counts].merge({ usage_data[:counts] = usage_data[:counts].merge({
epics: count(::Epic), epics: count(::Epic),
feature_flags: count(Operations::FeatureFlag),
geo_nodes: count(::GeoNode), geo_nodes: count(::GeoNode),
ldap_group_links: count(::LdapGroupLink), ldap_group_links: count(::LdapGroupLink),
ldap_keys: count(::LDAPKey), ldap_keys: count(::LDAPKey),
......
...@@ -29,6 +29,7 @@ describe Gitlab::UsageData do ...@@ -29,6 +29,7 @@ describe Gitlab::UsageData do
create(:package, project: projects[1]) create(:package, project: projects[1])
create(:project_tracing_setting, project: projects[0]) create(:project_tracing_setting, project: projects[0])
create(:operations_feature_flag, project: projects[0])
# for group_view testing # for group_view testing
create(:user) # user with group_view = NULL (should be counted as having default value 'details') create(:user) # user with group_view = NULL (should be counted as having default value 'details')
...@@ -78,10 +79,12 @@ describe Gitlab::UsageData do ...@@ -78,10 +79,12 @@ describe Gitlab::UsageData do
projects_with_tracing_enabled projects_with_tracing_enabled
projects_jira_dvcs_cloud_active projects_jira_dvcs_cloud_active
projects_jira_dvcs_server_active projects_jira_dvcs_server_active
feature_flags
)) ))
expect(count_data[:projects_with_prometheus_alerts]).to eq(2) expect(count_data[:projects_with_prometheus_alerts]).to eq(2)
expect(count_data[:projects_with_packages]).to eq(2) expect(count_data[:projects_with_packages]).to eq(2)
expect(count_data[:feature_flags]).to eq(1)
end end
it 'gathers deepest epic relationship level', :postgresql do it 'gathers deepest epic relationship level', :postgresql do
......
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