gitlab-org--gitlab-foss/spec/factories/services.rb

74 lines
1.5 KiB
Ruby
Raw Normal View History

FactoryBot.define do
factory :service do
project
type 'Service'
end
factory :custom_issue_tracker_service, class: CustomIssueTrackerService do
project
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
2017-02-07 15:59:38 +00:00
factory :kubernetes_service do
project
type 'KubernetesService'
2017-02-07 15:59:38 +00:00
active true
properties({
api_url: 'https://kubernetes.example.com',
token: 'a' * 40
2017-02-07 15:59:38 +00:00
})
skip_deprecation_validation true
2017-02-07 15:59:38 +00:00
end
factory :mock_deployment_service do
project
type 'MockDeploymentService'
active true
end
2017-05-31 11:40:03 +00:00
factory :prometheus_service do
project
2017-05-31 11:40:03 +00:00
active true
properties({
api_url: 'https://prometheus.example.com/',
manual_configuration: true
2017-05-31 11:40:03 +00:00
})
end
factory :jira_service do
project
active true
properties(
url: 'https://jira.example.com',
username: 'jira_user',
password: 'my-secret-password',
project_key: 'jira-key'
)
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'
token 'test_token'
end
end