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 ...@@ -11,7 +11,7 @@ class DeploymentService < Service
%w() %w()
end end
def predefined_variables def predefined_variables(project:)
[] []
end end
......
...@@ -322,6 +322,10 @@ FactoryBot.define do ...@@ -322,6 +322,10 @@ FactoryBot.define do
kubernetes_service kubernetes_service
end end
factory :mock_deployment_project, parent: :project do
mock_deployment_service
end
factory :prometheus_project, parent: :project do factory :prometheus_project, parent: :project do
after :create do |project| after :create do |project|
project.create_prometheus_service( project.create_prometheus_service(
......
...@@ -26,6 +26,12 @@ FactoryBot.define do ...@@ -26,6 +26,12 @@ FactoryBot.define do
}) })
end end
factory :mock_deployment_service do
project
type 'MockDeploymentService'
active true
end
factory :prometheus_service do factory :prometheus_service do
project project
active true active true
......
...@@ -2548,6 +2548,14 @@ describe Project do ...@@ -2548,6 +2548,14 @@ describe Project do
end end
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 context 'when project has a deployment service' do
shared_examples 'same behavior between KubernetesService and Platform::Kubernetes' do shared_examples 'same behavior between KubernetesService and Platform::Kubernetes' do
it 'returns variables from this service' 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