Add missing argument to DeploymentService#predefined_variables
This commit is contained in:
parent
684a1a1767
commit
470a86670f
4 changed files with 19 additions and 1 deletions
|
@ -11,7 +11,7 @@ class DeploymentService < Service
|
|||
%w()
|
||||
end
|
||||
|
||||
def predefined_variables
|
||||
def predefined_variables(project:)
|
||||
[]
|
||||
end
|
||||
|
||||
|
|
|
@ -322,6 +322,10 @@ FactoryBot.define do
|
|||
kubernetes_service
|
||||
end
|
||||
|
||||
factory :mock_deployment_project, parent: :project do
|
||||
mock_deployment_service
|
||||
end
|
||||
|
||||
factory :prometheus_project, parent: :project do
|
||||
after :create do |project|
|
||||
project.create_prometheus_service(
|
||||
|
|
|
@ -26,6 +26,12 @@ FactoryBot.define do
|
|||
})
|
||||
end
|
||||
|
||||
factory :mock_deployment_service do
|
||||
project
|
||||
type 'MockDeploymentService'
|
||||
active true
|
||||
end
|
||||
|
||||
factory :prometheus_service do
|
||||
project
|
||||
active true
|
||||
|
|
|
@ -2548,6 +2548,14 @@ describe Project do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when project uses mock deployment service' do
|
||||
let(:project) { create(:mock_deployment_project) }
|
||||
|
||||
it 'returns an empty array' do
|
||||
expect(project.deployment_variables).to eq []
|
||||
end
|
||||
end
|
||||
|
||||
context 'when project has a deployment service' do
|
||||
shared_examples 'same behavior between KubernetesService and Platform::Kubernetes' do
|
||||
it 'returns variables from this service' do
|
||||
|
|
Loading…
Reference in a new issue