diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-11-07 23:09:24 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-11-07 23:09:24 +0300 |
commit | cc9e3d09007174d4e0c30ae894c67160dcb72d10 (patch) | |
tree | bcca8d4c048c93aec86240317b97863877cdcf16 /spec | |
parent | 73b7709a95ebb8eff5452e3344dac7f8d369f77c (diff) | |
parent | 013d097e8bfb74b378e949c951ff55327484b518 (diff) |
Merge branch 'jira-ping-differentiate-cloud' into 'master'
Usage ping - Differentiate Jira Server and Cloud
Closes #51043
See merge request gitlab-org/gitlab-ce!22791
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/services.rb | 11 | ||||
-rw-r--r-- | spec/lib/gitlab/usage_data_spec.rb | 7 |
2 files changed, 17 insertions, 1 deletions
diff --git a/spec/factories/services.rb b/spec/factories/services.rb index 0d4fd49bf3a..5be56a49903 100644 --- a/spec/factories/services.rb +++ b/spec/factories/services.rb @@ -46,6 +46,17 @@ FactoryBot.define do ) end + factory :jira_cloud_service, class: JiraService do + project + active true + properties( + url: 'https://mysite.atlassian.net', + username: 'jira_user', + password: 'my-secret-password', + project_key: 'jira-key' + ) + end + factory :hipchat_service do project type 'HipchatService' diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb index 76dec4a44fd..b212d2b05f2 100644 --- a/spec/lib/gitlab/usage_data_spec.rb +++ b/spec/lib/gitlab/usage_data_spec.rb @@ -8,6 +8,7 @@ describe Gitlab::UsageData do before do create(:jira_service, project: projects[0]) create(:jira_service, project: projects[1]) + create(:jira_cloud_service, project: projects[2]) create(:prometheus_service, project: projects[1]) create(:service, project: projects[0], type: 'SlackSlashCommandsService', active: true) create(:service, project: projects[1], type: 'SlackService', active: true) @@ -97,6 +98,8 @@ describe Gitlab::UsageData do projects projects_imported_from_github projects_jira_active + projects_jira_server_active + projects_jira_cloud_active projects_slack_notifications_active projects_slack_slash_active projects_prometheus_active @@ -116,7 +119,9 @@ describe Gitlab::UsageData do expect(count_data[:projects]).to eq(3) expect(count_data[:projects_prometheus_active]).to eq(1) - expect(count_data[:projects_jira_active]).to eq(2) + expect(count_data[:projects_jira_active]).to eq(3) + expect(count_data[:projects_jira_server_active]).to eq(2) + expect(count_data[:projects_jira_cloud_active]).to eq(1) expect(count_data[:projects_slack_notifications_active]).to eq(2) expect(count_data[:projects_slack_slash_active]).to eq(1) |