Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
470a8667
Commit
470a8667
authored
Feb 07, 2019
by
James Fargher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing argument to DeploymentService#predefined_variables
parent
684a1a17
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
1 deletion
+19
-1
app/models/project_services/deployment_service.rb
app/models/project_services/deployment_service.rb
+1
-1
spec/factories/projects.rb
spec/factories/projects.rb
+4
-0
spec/factories/services.rb
spec/factories/services.rb
+6
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+8
-0
No files found.
app/models/project_services/deployment_service.rb
View file @
470a8667
...
@@ -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
...
...
spec/factories/projects.rb
View file @
470a8667
...
@@ -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
(
...
...
spec/factories/services.rb
View file @
470a8667
...
@@ -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
...
...
spec/models/project_spec.rb
View file @
470a8667
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment