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
79b7ae8c
Commit
79b7ae8c
authored
Nov 12, 2019
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create a Geo event on design deletion
parent
d3140f44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
ee/app/services/design_management/delete_designs_service.rb
ee/app/services/design_management/delete_designs_service.rb
+3
-0
ee/spec/services/design_management/delete_designs_service_spec.rb
...services/design_management/delete_designs_service_spec.rb
+9
-0
No files found.
ee/app/services/design_management/delete_designs_service.rb
View file @
79b7ae8c
...
...
@@ -17,6 +17,9 @@ module DesignManagement
actions
=
build_actions
version
=
run_actions
(
actions
)
# Create a Geo event so changes will be replicated to secondary node(s)
repository
.
log_geo_updated_event
success
(
version:
version
)
end
...
...
ee/spec/services/design_management/delete_designs_service_spec.rb
View file @
79b7ae8c
...
...
@@ -89,6 +89,15 @@ describe DesignManagement::DeleteDesignsService do
expect
{
run_service
}.
to
change
{
DesignManagement
::
Version
.
where
(
issue:
issue
).
count
}.
by
(
1
)
end
it
'calls repository#log_geo_updated_event'
do
design_repository
=
EE
::
Gitlab
::
GlRepository
::
DESIGN
.
repository_accessor
.
call
(
project
)
allow_any_instance_of
(
described_class
).
to
receive
(
:repository
).
and_return
(
design_repository
)
expect
(
design_repository
).
to
receive
(
:log_geo_updated_event
)
run_service
end
it
'returns the new version'
do
version
=
response
[
:version
]
...
...
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