summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-03-27 14:16:50 +0200
committerMatija Čupić <matteeyah@gmail.com>2018-03-27 14:16:50 +0200
commit3e3e7d54d5b4e7b917cffe36cde30474cc2937cd (patch)
tree54b1071f2bdd21fe0c7b86ed8487202d8c1acd55
parent8853e183a85421d156dadd647f700a7a1a985b55 (diff)
downloadgitlab-ce-44291-usage-ping-for-kubernetes-integration.tar.gz
Check cluster usage datapoint counts44291-usage-ping-for-kubernetes-integration
-rw-r--r--spec/lib/gitlab/usage_data_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb
index d39668a6caf..9e6aa109a4b 100644
--- a/spec/lib/gitlab/usage_data_spec.rb
+++ b/spec/lib/gitlab/usage_data_spec.rb
@@ -12,6 +12,14 @@ describe Gitlab::UsageData do
create(:service, project: projects[0], type: 'SlackSlashCommandsService', active: true)
create(:service, project: projects[1], type: 'SlackService', active: true)
create(:service, project: projects[2], type: 'SlackService', active: true)
+
+ gcp_cluster = create(:cluster, :provided_by_gcp)
+ create(:cluster, :provided_by_user)
+ create(:cluster, :provided_by_user, :disabled)
+ create(:clusters_applications_helm, :installed, cluster: gcp_cluster)
+ create(:clusters_applications_ingress, :installed, cluster: gcp_cluster)
+ create(:clusters_applications_prometheus, :installed, cluster: gcp_cluster)
+ create(:clusters_applications_runner, :installed, cluster: gcp_cluster)
end
subject { described_class.data }
@@ -103,6 +111,15 @@ describe Gitlab::UsageData do
expect(count_data[:projects_jira_active]).to eq(2)
expect(count_data[:projects_slack_notifications_active]).to eq(2)
expect(count_data[:projects_slack_slash_active]).to eq(1)
+
+ expect(count_data[:clusters_enabled]).to eq(6)
+ expect(count_data[:clusters_disabled]).to eq(1)
+ expect(count_data[:clusters_platforms_gke]).to eq(1)
+ expect(count_data[:clusters_platforms_user]).to eq(1)
+ expect(count_data[:clusters_applications_helm]).to eq(1)
+ expect(count_data[:clusters_applications_ingress]).to eq(1)
+ expect(count_data[:clusters_applications_prometheus]).to eq(1)
+ expect(count_data[:clusters_applications_runner]).to eq(1)
end
end