Commit 470a8667 authored by James Fargher's avatar James Fargher

Add missing argument to DeploymentService#predefined_variables

parent 684a1a17
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment