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
3bdff7aa
Commit
3bdff7aa
authored
Mar 05, 2019
by
João Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename ClusterUpdateAppWorker to ClusterPatchAppWorker
- This is to avoid colision with EE ClusterUpdateAppWorker
parent
5e6e1dd5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
13 deletions
+13
-13
app/services/clusters/applications/update_service.rb
app/services/clusters/applications/update_service.rb
+1
-1
app/workers/all_queues.yml
app/workers/all_queues.yml
+1
-1
app/workers/cluster_patch_app_worker.rb
app/workers/cluster_patch_app_worker.rb
+1
-1
spec/controllers/groups/clusters/applications_controller_spec.rb
...ntrollers/groups/clusters/applications_controller_spec.rb
+2
-2
spec/controllers/projects/clusters/applications_controller_spec.rb
...rollers/projects/clusters/applications_controller_spec.rb
+2
-2
spec/features/projects/clusters/applications_spec.rb
spec/features/projects/clusters/applications_spec.rb
+1
-1
spec/services/clusters/applications/update_service_spec.rb
spec/services/clusters/applications/update_service_spec.rb
+5
-5
No files found.
app/services/clusters/applications/update_service.rb
View file @
3bdff7aa
...
...
@@ -6,7 +6,7 @@ module Clusters
private
def
worker_class
(
application
)
Cluster
Update
AppWorker
Cluster
Patch
AppWorker
end
def
builders
...
...
app/workers/all_queues.yml
View file @
3bdff7aa
...
...
@@ -23,7 +23,7 @@
-
cronjob:prune_web_hook_logs
-
gcp_cluster:cluster_install_app
-
gcp_cluster:cluster_
update
_app
-
gcp_cluster:cluster_
patch
_app
-
gcp_cluster:cluster_upgrade_app
-
gcp_cluster:cluster_provision
-
gcp_cluster:cluster_wait_for_app_installation
...
...
app/workers/cluster_
update
_app_worker.rb
→
app/workers/cluster_
patch
_app_worker.rb
View file @
3bdff7aa
# frozen_string_literal: true
class
Cluster
Update
AppWorker
class
Cluster
Patch
AppWorker
include
ApplicationWorker
include
ClusterQueue
include
ClusterApplications
...
...
spec/controllers/groups/clusters/applications_controller_spec.rb
View file @
3bdff7aa
...
...
@@ -105,7 +105,7 @@ describe Groups::Clusters::ApplicationsController do
context
"when cluster and app exists"
do
it
"schedules an application update"
do
expect
(
Cluster
Update
AppWorker
).
to
receive
(
:perform_async
).
with
(
application
.
name
,
anything
).
once
expect
(
Cluster
Patch
AppWorker
).
to
receive
(
:perform_async
).
with
(
application
.
name
,
anything
).
once
is_expected
.
to
have_http_status
(
:no_content
)
...
...
@@ -138,7 +138,7 @@ describe Groups::Clusters::ApplicationsController do
describe
'security'
do
before
do
allow
(
Cluster
Update
AppWorker
).
to
receive
(
:perform_async
)
allow
(
Cluster
Patch
AppWorker
).
to
receive
(
:perform_async
)
end
it_behaves_like
'a secure endpoint'
...
...
spec/controllers/projects/clusters/applications_controller_spec.rb
View file @
3bdff7aa
...
...
@@ -106,7 +106,7 @@ describe Projects::Clusters::ApplicationsController do
context
"when cluster and app exists"
do
it
"schedules an application update"
do
expect
(
Cluster
Update
AppWorker
).
to
receive
(
:perform_async
).
with
(
application
.
name
,
anything
).
once
expect
(
Cluster
Patch
AppWorker
).
to
receive
(
:perform_async
).
with
(
application
.
name
,
anything
).
once
is_expected
.
to
have_http_status
(
:no_content
)
...
...
@@ -139,7 +139,7 @@ describe Projects::Clusters::ApplicationsController do
describe
'security'
do
before
do
allow
(
Cluster
Update
AppWorker
).
to
receive
(
:perform_async
)
allow
(
Cluster
Patch
AppWorker
).
to
receive
(
:perform_async
)
end
it_behaves_like
'a secure endpoint'
...
...
spec/features/projects/clusters/applications_spec.rb
View file @
3bdff7aa
...
...
@@ -135,7 +135,7 @@ describe 'Clusters Applications', :js do
it
'can then update the domain'
do
page
.
within
(
'.js-cluster-application-row-knative'
)
do
expect
(
Cluster
Update
AppWorker
).
to
receive
(
:perform_async
)
expect
(
Cluster
Patch
AppWorker
).
to
receive
(
:perform_async
)
expect
(
domainname_form_value
).
to
eq
(
'domain.example.org'
)
...
...
spec/services/clusters/applications/update_service_spec.rb
View file @
3bdff7aa
...
...
@@ -14,12 +14,12 @@ describe Clusters::Applications::UpdateService do
describe
'#execute'
do
before
do
allow
(
Cluster
Update
AppWorker
).
to
receive
(
:perform_async
)
allow
(
Cluster
Patch
AppWorker
).
to
receive
(
:perform_async
)
end
context
'application is not installed'
do
it
'raises Clusters::Applications::BaseService::InvalidApplicationError'
do
expect
(
Cluster
Update
AppWorker
).
not_to
receive
(
:perform_async
)
expect
(
Cluster
Patch
AppWorker
).
not_to
receive
(
:perform_async
)
expect
{
subject
}
.
to
raise_exception
{
Clusters
::
Applications
::
BaseService
::
InvalidApplicationError
}
...
...
@@ -46,8 +46,8 @@ describe Clusters::Applications::UpdateService do
expect
(
application
.
reload
).
to
be_scheduled
end
it
'schedules Cluster
Update
AppWorker'
do
expect
(
Cluster
Update
AppWorker
).
to
receive
(
:perform_async
)
it
'schedules Cluster
Patch
AppWorker'
do
expect
(
Cluster
Patch
AppWorker
).
to
receive
(
:perform_async
)
subject
end
...
...
@@ -59,7 +59,7 @@ describe Clusters::Applications::UpdateService do
end
it
'raises StateMachines::InvalidTransition'
do
expect
(
Cluster
Update
AppWorker
).
not_to
receive
(
:perform_async
)
expect
(
Cluster
Patch
AppWorker
).
not_to
receive
(
:perform_async
)
expect
{
subject
}
.
to
raise_exception
{
StateMachines
::
InvalidTransition
}
...
...
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