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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
44113533
Commit
44113533
authored
Jan 14, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
c3bcd285
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
12 deletions
+24
-12
app/models/clusters/concerns/application_core.rb
app/models/clusters/concerns/application_core.rb
+1
-1
spec/support/shared_examples/models/cluster_application_initial_status.rb
...red_examples/models/cluster_application_initial_status.rb
+23
-1
spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
...ples/models/cluster_application_status_shared_examples.rb
+0
-10
No files found.
app/models/clusters/concerns/application_core.rb
View file @
44113533
...
@@ -15,7 +15,7 @@ module Clusters
...
@@ -15,7 +15,7 @@ module Clusters
def
set_initial_status
def
set_initial_status
return
unless
not_installable?
return
unless
not_installable?
self
.
status
=
status_states
[
:installable
]
if
cluster
&
.
application_helm_available?
self
.
status
=
status_states
[
:installable
]
if
cluster
&
.
application_helm_available?
||
Feature
.
enabled?
(
:managed_apps_local_tiller
)
end
end
def
can_uninstall?
def
can_uninstall?
...
...
spec/support/shared_examples/models/cluster_application_initial_status.rb
View file @
44113533
...
@@ -6,8 +6,30 @@ shared_examples 'cluster application initial status specs' do
...
@@ -6,8 +6,30 @@ shared_examples 'cluster application initial status specs' do
subject
{
described_class
.
new
(
cluster:
cluster
)
}
subject
{
described_class
.
new
(
cluster:
cluster
)
}
context
'local tiller feature flag is disabled'
do
before
do
stub_feature_flags
(
managed_apps_local_tiller:
false
)
end
it
'sets a default status'
do
expect
(
subject
.
status_name
).
to
be
(
:not_installable
)
end
end
context
'local tiller feature flag is enabled'
do
before
do
stub_feature_flags
(
managed_apps_local_tiller:
true
)
end
it
'sets a default status'
do
expect
(
subject
.
status_name
).
to
be
(
:installable
)
end
end
context
'when application helm is scheduled'
do
context
'when application helm is scheduled'
do
before
do
before
do
stub_feature_flags
(
managed_apps_local_tiller:
false
)
create
(
:clusters_applications_helm
,
:scheduled
,
cluster:
cluster
)
create
(
:clusters_applications_helm
,
:scheduled
,
cluster:
cluster
)
end
end
...
@@ -16,7 +38,7 @@ shared_examples 'cluster application initial status specs' do
...
@@ -16,7 +38,7 @@ shared_examples 'cluster application initial status specs' do
end
end
end
end
context
'when application
is schedu
led'
do
context
'when application
helm is instal
led'
do
before
do
before
do
create
(
:clusters_applications_helm
,
:installed
,
cluster:
cluster
)
create
(
:clusters_applications_helm
,
:installed
,
cluster:
cluster
)
end
end
...
...
spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
View file @
44113533
# frozen_string_literal: true
# frozen_string_literal: true
shared_examples
'cluster application status specs'
do
|
application_name
|
shared_examples
'cluster application status specs'
do
|
application_name
|
describe
'#status'
do
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
)
}
subject
{
described_class
.
new
(
cluster:
cluster
)
}
it
'sets a default status'
do
expect
(
subject
.
status_name
).
to
be
(
:not_installable
)
end
end
describe
'#status_states'
do
describe
'#status_states'
do
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
)
}
let
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
)
}
...
...
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