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
3913bf55
Commit
3913bf55
authored
Jun 06, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix EE::WikiPages::BaseService
parent
cc7aac36
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
app/services/ee/wiki_pages/base_service.rb
app/services/ee/wiki_pages/base_service.rb
+1
-1
spec/services/ee/wiki_pages/create_service_spec.rb
spec/services/ee/wiki_pages/create_service_spec.rb
+3
-3
spec/services/ee/wiki_pages/destroy_service_spec.rb
spec/services/ee/wiki_pages/destroy_service_spec.rb
+3
-3
spec/services/ee/wiki_pages/update_service_spec.rb
spec/services/ee/wiki_pages/update_service_spec.rb
+3
-3
No files found.
app/services/ee/wiki_pages/base_service.rb
View file @
3913bf55
...
...
@@ -17,7 +17,7 @@ module EE
def
process_wiki_repository_update
if
::
Gitlab
::
Geo
.
primary?
# Create wiki repository updated event on Geo event log
::
Geo
::
PushEventStore
.
new
(
project
,
source:
Geo
::
Push
Event
::
WIKI
).
create
::
Geo
::
RepositoryUpdatedEventStore
.
new
(
project
,
source:
Geo
::
RepositoryUpdated
Event
::
WIKI
).
create
# Triggers repository update on secondary nodes
::
Gitlab
::
Geo
.
notify_wiki_update
(
project
)
...
...
spec/services/ee/wiki_pages/create_service_spec.rb
View file @
3913bf55
...
...
@@ -24,9 +24,9 @@ describe WikiPages::CreateService, services: true do
allow
(
Gitlab
::
Geo
).
to
receive
(
:primary?
)
{
true
}
end
it
'triggers Geo::
Push
EventStore when Geo is enabled'
do
expect
(
Geo
::
PushEventStore
).
to
receive
(
:new
).
with
(
instance_of
(
Project
),
source:
Geo
::
Push
Event
::
WIKI
).
and_call_original
expect_any_instance_of
(
Geo
::
Push
EventStore
).
to
receive
(
:create
)
it
'triggers Geo::
RepositoryUpdated
EventStore when Geo is enabled'
do
expect
(
Geo
::
RepositoryUpdatedEventStore
).
to
receive
(
:new
).
with
(
instance_of
(
Project
),
source:
Geo
::
RepositoryUpdated
Event
::
WIKI
).
and_call_original
expect_any_instance_of
(
Geo
::
RepositoryUpdated
EventStore
).
to
receive
(
:create
)
service
.
execute
end
...
...
spec/services/ee/wiki_pages/destroy_service_spec.rb
View file @
3913bf55
...
...
@@ -17,9 +17,9 @@ describe WikiPages::DestroyService, services: true do
allow
(
Gitlab
::
Geo
).
to
receive
(
:primary?
)
{
true
}
end
it
'triggers Geo::
Push
EventStore when Geo is enabled'
do
expect
(
Geo
::
PushEventStore
).
to
receive
(
:new
).
with
(
instance_of
(
Project
),
source:
Geo
::
Push
Event
::
WIKI
).
and_call_original
expect_any_instance_of
(
Geo
::
Push
EventStore
).
to
receive
(
:create
)
it
'triggers Geo::
RepositoryUpdated
EventStore when Geo is enabled'
do
expect
(
Geo
::
RepositoryUpdatedEventStore
).
to
receive
(
:new
).
with
(
instance_of
(
Project
),
source:
Geo
::
RepositoryUpdated
Event
::
WIKI
).
and_call_original
expect_any_instance_of
(
Geo
::
RepositoryUpdated
EventStore
).
to
receive
(
:create
)
service
.
execute
(
page
)
end
...
...
spec/services/ee/wiki_pages/update_service_spec.rb
View file @
3913bf55
...
...
@@ -25,9 +25,9 @@ describe WikiPages::UpdateService, services: true do
allow
(
Gitlab
::
Geo
).
to
receive
(
:primary?
)
{
true
}
end
it
'triggers Geo::
Push
EventStore when Geo is enabled'
do
expect
(
Geo
::
PushEventStore
).
to
receive
(
:new
).
with
(
instance_of
(
Project
),
source:
Geo
::
Push
Event
::
WIKI
).
and_call_original
expect_any_instance_of
(
Geo
::
Push
EventStore
).
to
receive
(
:create
)
it
'triggers Geo::
RepositoryUpdated
EventStore when Geo is enabled'
do
expect
(
Geo
::
RepositoryUpdatedEventStore
).
to
receive
(
:new
).
with
(
instance_of
(
Project
),
source:
Geo
::
RepositoryUpdated
Event
::
WIKI
).
and_call_original
expect_any_instance_of
(
Geo
::
RepositoryUpdated
EventStore
).
to
receive
(
:create
)
service
.
execute
(
page
)
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