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
0ac40127
Commit
0ac40127
authored
Sep 17, 2018
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add event store for Geo::ResetChecksumEvent
parent
8d51a91f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
ee/app/services/geo/reset_checksum_event_store.rb
ee/app/services/geo/reset_checksum_event_store.rb
+13
-0
ee/spec/services/geo/reset_checksum_event_store_spec.rb
ee/spec/services/geo/reset_checksum_event_store_spec.rb
+28
-0
ee/spec/support/shared_examples/geo_event_store_shared_examples.rb
...upport/shared_examples/geo_event_store_shared_examples.rb
+1
-1
No files found.
ee/app/services/geo/reset_checksum_event_store.rb
0 → 100644
View file @
0ac40127
# frozen_string_literal: true
module
Geo
class
ResetChecksumEventStore
<
EventStore
self
.
event_type
=
:reset_checksum_event
private
def
build_event
Geo
::
ResetChecksumEvent
.
new
(
project:
project
)
end
end
end
ee/spec/services/geo/reset_checksum_event_store_spec.rb
0 → 100644
View file @
0ac40127
# frozen_string_literal: true
require
'spec_helper'
describe
Geo
::
ResetChecksumEventStore
do
include
EE
::
GeoHelpers
set
(
:project
)
{
create
(
:project
)
}
set
(
:secondary_node
)
{
create
(
:geo_node
)
}
subject
{
described_class
.
new
(
project
)
}
describe
'#create'
do
it_behaves_like
'a Geo event store'
,
Geo
::
ResetChecksumEvent
context
'when running on a primary node'
do
before
do
stub_primary_node
end
it
'tracks the project that checksum must be wiped'
do
subject
.
create
expect
(
Geo
::
ResetChecksumEvent
.
last
).
to
have_attributes
(
project_id:
project
.
id
)
end
end
end
end
ee/spec/support/shared_examples/geo_event_store_shared_examples.rb
View file @
0ac40127
# frozen_string_literal: true
# frozen_string_literal: true
shared_examples_for
'a Geo event store'
do
|
event_class
|
shared_examples_for
'a Geo event store'
do
|
event_class
|
context
'running on a secondary node'
do
context
'
when
running on a secondary node'
do
before
do
before
do
stub_secondary_node
stub_secondary_node
end
end
...
...
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