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
afc76744
Commit
afc76744
authored
Oct 12, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix reading the status of a secondary Geo node from the primary
parent
bd7ba308
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
app/services/geo/node_status_service.rb
app/services/geo/node_status_service.rb
+2
-0
changelogs/unreleased-ee/3742-geo-node-status-service-bug.yml
...gelogs/unreleased-ee/3742-geo-node-status-service-bug.yml
+5
-0
spec/services/geo/node_status_service_spec.rb
spec/services/geo/node_status_service_spec.rb
+22
-0
No files found.
app/services/geo/node_status_service.rb
View file @
afc76744
...
...
@@ -11,8 +11,10 @@ module Geo
repositories_failed_count
lfs_objects_count
lfs_objects_synced_count
lfs_objects_failed_count
attachments_count
attachments_synced_count
attachments_failed_count
last_event_id
last_event_date
cursor_last_event_id
...
...
changelogs/unreleased-ee/3742-geo-node-status-service-bug.yml
0 → 100644
View file @
afc76744
---
title
:
Fix reading the status of a secondary Geo node from the primary
merge_request
:
3140
author
:
type
:
fixed
spec/services/geo/node_status_service_spec.rb
View file @
afc76744
...
...
@@ -6,6 +6,26 @@ describe Geo::NodeStatusService do
subject
{
described_class
.
new
}
describe
'KEYS'
do
it
'matches the serializer keys'
do
exceptions
=
%w[
id
healthy
repositories_synced_in_percentage
lfs_objects_synced_in_percentage
attachments_synced_in_percentage
]
expected
=
GeoNodeStatusEntity
.
new
(
GeoNodeStatus
.
new
)
.
as_json
.
keys
.
map
(
&
:to_s
)
-
exceptions
expect
(
described_class
::
KEYS
).
to
match_array
(
expected
)
end
end
describe
'#call'
do
it
'parses a 401 response'
do
request
=
double
(
success?:
false
,
...
...
@@ -27,8 +47,10 @@ describe Geo::NodeStatusService do
repositories_failed_count:
2
,
lfs_objects_count:
100
,
lfs_objects_synced_count:
50
,
lfs_objects_failed_count:
12
,
attachments_count:
30
,
attachments_synced_count:
30
,
attachments_failed_count:
25
,
last_event_id:
2
,
last_event_date:
Time
.
now
,
cursor_last_event_id:
1
,
...
...
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