summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2019-05-17 09:10:29 +0000
committerJames Lopez <james@gitlab.com>2019-05-17 09:10:29 +0000
commita3f80f9f2e83298a0fe0cf6637871822bb1a8edb (patch)
treea740d5eb1a838e4796d0fef0110ffa078e4dd7ba /spec
parent74fa088b873d126d97656ec90881ff5a1561b30a (diff)
downloadgitlab-ce-a3f80f9f2e83298a0fe0cf6637871822bb1a8edb.tar.gz
Add PoolRepository to the usage ping
PoolRepository is a relatively new model of which the counts could help to further determine the priority of new features. Also gives some insight into the number of forks customers have.
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/usage_data_spec.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb
index aa975c8bb0b..e44463dd767 100644
--- a/spec/lib/gitlab/usage_data_spec.rb
+++ b/spec/lib/gitlab/usage_data_spec.rb
@@ -63,12 +63,7 @@ describe Gitlab::UsageData do
end
it "gathers usage counts" do
- count_data = subject[:counts]
-
- expect(count_data[:boards]).to eq(1)
- expect(count_data[:projects]).to eq(3)
-
- expect(count_data.keys).to include(*%i(
+ expected_keys = %i(
assignee_lists
boards
ci_builds
@@ -112,6 +107,7 @@ describe Gitlab::UsageData do
milestone_lists
milestones
notes
+ pool_repositories
projects
projects_imported_from_github
projects_jira_active
@@ -132,7 +128,14 @@ describe Gitlab::UsageData do
uploads
web_hooks
user_preferences
- ))
+ )
+
+ count_data = subject[:counts]
+
+ expect(count_data[:boards]).to eq(1)
+ expect(count_data[:projects]).to eq(3)
+ expect(count_data.keys).to include(*expected_keys)
+ expect(expected_keys - count_data.keys).to be_empty
end
it 'does not gather user preferences usage data when the feature is disabled' do
@@ -211,7 +214,7 @@ describe Gitlab::UsageData do
it "gathers license data" do
expect(subject[:uuid]).to eq(Gitlab::CurrentSettings.uuid)
expect(subject[:version]).to eq(Gitlab::VERSION)
- expect(subject[:installation_type]).to eq(Gitlab::INSTALLATION_TYPE)
+ expect(subject[:installation_type]).to eq('gitlab-development-kit')
expect(subject[:active_user_count]).to eq(User.active.count)
expect(subject[:recorded_at]).to be_a(Time)
end