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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
factory :hipchat_service do
|
|
|
|
project
|
|
|
|
type 'HipchatService'
|
|
|
|
token 'test_token'
|
|
|
|
end
|
2016-06-02 11:05:42 +05:30
|
|
|
end
|