debian-mirror-gitlab/spec/factories/services.rb

72 lines
1.4 KiB
Ruby
Raw Normal View History

2018-03-17 18:26:18 +05:30
FactoryBot.define do
2016-06-02 11:05:42 +05:30
factory :service do
2017-09-10 17:25:29 +05:30
project
2017-08-17 22:00:37 +05:30
type 'Service'
end
factory :custom_issue_tracker_service, class: CustomIssueTrackerService do
2017-09-10 17:25:29 +05:30
project
2017-08-17 22:00:37 +05:30
type 'CustomIssueTrackerService'
category 'issue_tracker'
active true
properties(
project_url: 'https://project.url.com',
issues_url: 'https://issues.url.com',
new_issue_url: 'https://newissue.url.com'
)
end
factory :kubernetes_service do
2017-09-10 17:25:29 +05:30
project
2018-03-17 18:26:18 +05:30
type 'KubernetesService'
2017-08-17 22:00:37 +05:30
active true
properties({
api_url: 'https://kubernetes.example.com',
2017-09-10 17:25:29 +05:30
token: 'a' * 40
})
end
2019-05-18 00:54:41 +05:30
factory :mock_deployment_service do
project
type 'MockDeploymentService'
active true
end
2017-09-10 17:25:29 +05:30
factory :prometheus_service do
project
active true
properties({
2018-03-17 18:26:18 +05:30
api_url: 'https://prometheus.example.com/',
manual_configuration: true
2017-08-17 22:00:37 +05:30
})
end
factory :jira_service do
2017-09-10 17:25:29 +05:30
project
2017-08-17 22:00:37 +05:30
active true
properties(
url: 'https://jira.example.com',
2018-03-17 18:26:18 +05:30
username: 'jira_user',
password: 'my-secret-password',
2017-08-17 22:00:37 +05:30
project_key: 'jira-key'
)
2016-06-02 11:05:42 +05:30
end
2017-09-10 17:25:29 +05:30
2018-12-13 13:39:08 +05:30
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
2017-09-10 17:25:29 +05:30
factory :hipchat_service do
project
type 'HipchatService'
token 'test_token'
end
2016-06-02 11:05:42 +05:30
end