Commit aae68f52 authored by Michael Kozono's avatar Michael Kozono

Merge branch '36165-creating-events-on-design-deletion' into 'master'

Create a Geo event on design deletion

Closes #36165

See merge request gitlab-org/gitlab!19979
parents 3a96c2c6 79b7ae8c
...@@ -17,6 +17,9 @@ module DesignManagement ...@@ -17,6 +17,9 @@ module DesignManagement
actions = build_actions actions = build_actions
version = run_actions(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) success(version: version)
end end
......
...@@ -89,6 +89,15 @@ describe DesignManagement::DeleteDesignsService do ...@@ -89,6 +89,15 @@ describe DesignManagement::DeleteDesignsService do
expect { run_service }.to change { DesignManagement::Version.where(issue: issue).count }.by(1) expect { run_service }.to change { DesignManagement::Version.where(issue: issue).count }.by(1)
end 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 it 'returns the new version' do
version = response[:version] version = response[:version]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment