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
1625adf5
Commit
1625adf5
authored
Nov 07, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ingress to use install_command
parent
c4278602
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
app/models/clusters/applications/ingress.rb
app/models/clusters/applications/ingress.rb
+4
-0
spec/models/clusters/applications/ingress_spec.rb
spec/models/clusters/applications/ingress_spec.rb
+18
-2
No files found.
app/models/clusters/applications/ingress.rb
View file @
1625adf5
...
@@ -35,6 +35,10 @@ module Clusters
...
@@ -35,6 +35,10 @@ module Clusters
def
chart
def
chart
'stable/nginx-ingress'
'stable/nginx-ingress'
end
end
def
install_command
Gitlab
::
Kubernetes
::
Helm
::
InstallCommand
.
new
(
name
,
false
,
chart
)
end
end
end
end
end
end
end
spec/models/clusters/applications/ingress_spec.rb
View file @
1625adf5
...
@@ -23,9 +23,19 @@ describe Clusters::Applications::Ingress do
...
@@ -23,9 +23,19 @@ describe Clusters::Applications::Ingress do
expect
(
subject
.
status_name
).
to
be
(
:not_installable
)
expect
(
subject
.
status_name
).
to
be
(
:not_installable
)
end
end
context
'when application helm is
defin
ed'
do
context
'when application helm is
schedul
ed'
do
before
do
before
do
create
(
:cluster_applications_ingress
,
cluster:
cluster
)
create
(
:cluster_applications_helm
,
:scheduled
,
cluster:
cluster
)
end
it
'defaults to :not_installable'
do
expect
(
subject
.
status_name
).
to
be
(
:not_installable
)
end
end
context
'when application helm is installed'
do
before
do
create
(
:cluster_applications_helm
,
:installed
,
cluster:
cluster
)
end
end
it
'defaults to :installable'
do
it
'defaults to :installable'
do
...
@@ -34,6 +44,12 @@ describe Clusters::Applications::Ingress do
...
@@ -34,6 +44,12 @@ describe Clusters::Applications::Ingress do
end
end
end
end
describe
'#install_command'
do
it
'has all the needed information'
do
expect
(
subject
.
install_command
).
to
have_attributes
(
name:
subject
.
name
,
install_helm:
false
,
chart:
subject
.
chart
)
end
end
describe
'status state machine'
do
describe
'status state machine'
do
describe
'#make_installing'
do
describe
'#make_installing'
do
subject
{
create
(
:cluster_applications_ingress
,
:scheduled
)
}
subject
{
create
(
:cluster_applications_ingress
,
:scheduled
)
}
...
...
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