Add enabled prefix to feature keys to be consistent with other keys

parent 3a1a5b28
...@@ -24,7 +24,6 @@ module Gitlab ...@@ -24,7 +24,6 @@ module Gitlab
installation_type: Gitlab::INSTALLATION_TYPE, installation_type: Gitlab::INSTALLATION_TYPE,
active_user_count: User.active.count, active_user_count: User.active.count,
recorded_at: Time.now, recorded_at: Time.now,
mattermost_enabled: Gitlab.config.mattermost.enabled,
edition: 'CE' edition: 'CE'
} }
...@@ -91,13 +90,14 @@ module Gitlab ...@@ -91,13 +90,14 @@ module Gitlab
def features_usage_data_ce def features_usage_data_ce
{ {
signup: Gitlab::CurrentSettings.allow_signup?, container_registry_enabled: Gitlab.config.registry.enabled,
ldap: Gitlab.config.ldap.enabled, gitlab_shared_runners_enabled: Gitlab.config.gitlab_ci.shared_runners_enabled,
gravatar: Gitlab::CurrentSettings.gravatar_enabled?, gravatar_enabled: Gitlab::CurrentSettings.gravatar_enabled?,
omniauth: Gitlab.config.omniauth.enabled, ldap_enabled: Gitlab.config.ldap.enabled,
reply_by_email: Gitlab::IncomingEmail.enabled?, mattermost_enabled: Gitlab.config.mattermost.enabled,
container_registry: Gitlab.config.registry.enabled, omniauth_enabled: Gitlab.config.omniauth.enabled,
gitlab_shared_runners: Gitlab.config.gitlab_ci.shared_runners_enabled reply_by_email_enabled: Gitlab::IncomingEmail.enabled?,
signup_enabled: Gitlab::CurrentSettings.allow_signup?
} }
end end
......
...@@ -29,20 +29,20 @@ describe Gitlab::UsageData do ...@@ -29,20 +29,20 @@ describe Gitlab::UsageData do
active_user_count active_user_count
counts counts
recorded_at recorded_at
mattermost_enabled
edition edition
version version
installation_type installation_type
uuid uuid
hostname hostname
signup mattermost_enabled
ldap signup_enabled
gravatar ldap_enabled
omniauth gravatar_enabled
reply_by_email omniauth_enabled
container_registry reply_by_email_enabled
container_registry_enabled
gitlab_shared_runners_enabled
gitlab_pages gitlab_pages
gitlab_shared_runners
git git
database database
avg_cycle_analytics avg_cycle_analytics
...@@ -129,13 +129,14 @@ describe Gitlab::UsageData do ...@@ -129,13 +129,14 @@ describe Gitlab::UsageData do
subject { described_class.features_usage_data_ce } subject { described_class.features_usage_data_ce }
it 'gathers feature usage data' do it 'gathers feature usage data' do
expect(subject[:signup]).to eq(Gitlab::CurrentSettings.allow_signup?) expect(subject[:mattermost_enabled]).to eq(Gitlab.config.mattermost.enabled)
expect(subject[:ldap]).to eq(Gitlab.config.ldap.enabled) expect(subject[:signup_enabled]).to eq(Gitlab::CurrentSettings.allow_signup?)
expect(subject[:gravatar]).to eq(Gitlab::CurrentSettings.gravatar_enabled?) expect(subject[:ldap_enabled]).to eq(Gitlab.config.ldap.enabled)
expect(subject[:omniauth]).to eq(Gitlab.config.omniauth.enabled) expect(subject[:gravatar_enabled]).to eq(Gitlab::CurrentSettings.gravatar_enabled?)
expect(subject[:reply_by_email]).to eq(Gitlab::IncomingEmail.enabled?) expect(subject[:omniauth_enabled]).to eq(Gitlab.config.omniauth.enabled)
expect(subject[:container_registry]).to eq(Gitlab.config.registry.enabled) expect(subject[:reply_by_email_enabled]).to eq(Gitlab::IncomingEmail.enabled?)
expect(subject[:gitlab_shared_runners]).to eq(Gitlab.config.gitlab_ci.shared_runners_enabled) expect(subject[:container_registry_enabled]).to eq(Gitlab.config.registry.enabled)
expect(subject[:gitlab_shared_runners_enabled]).to eq(Gitlab.config.gitlab_ci.shared_runners_enabled)
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