Add missing attributes to Entity::GeoNodeStatus

parent d547754e
...@@ -779,12 +779,16 @@ module API ...@@ -779,12 +779,16 @@ module API
end end
class GeoNodeStatus < Grape::Entity class GeoNodeStatus < Grape::Entity
expose :id
expose :health expose :health
expose :healthy?, as: :healthy
expose :repositories_count expose :repositories_count
expose :repositories_synced_count expose :repositories_synced_count
expose :repositories_failed_count expose :repositories_failed_count
expose :lfs_objects_count expose :lfs_objects_count
expose :lfs_objects_synced_count expose :lfs_objects_synced_count
expose :attachments_count
expose :attachments_synced_count
end end
class PersonalAccessToken < Grape::Entity class PersonalAccessToken < Grape::Entity
......
...@@ -37,7 +37,7 @@ module API ...@@ -37,7 +37,7 @@ module API
require_node_to_be_secondary! require_node_to_be_secondary!
require_node_to_have_tracking_db! require_node_to_have_tracking_db!
present GeoNodeStatus.new, with: Entities::GeoNodeStatus present GeoNodeStatus.new(id: Gitlab::Geo.current_node.id), with: Entities::GeoNodeStatus
end end
# Enqueue a batch of IDs of wiki's projects to have their # Enqueue a batch of IDs of wiki's projects to have their
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
"id", "id",
"healthy", "healthy",
"health", "health",
"attachments_count",
"attachments_synced_count",
"lfs_objects_count", "lfs_objects_count",
"lfs_objects_synced_count", "lfs_objects_synced_count",
"lfs_objects_synced_in_percentage",
"repositories_count", "repositories_count",
"repositories_failed_count", "repositories_failed_count",
"repositories_synced_count", "repositories_synced_count"
"repositories_synced_in_percentage"
], ],
"properties" : { "properties" : {
"id": { "type": "integer" }, "id": { "type": "integer" },
......
...@@ -293,7 +293,7 @@ describe API::Geo, api: true do ...@@ -293,7 +293,7 @@ describe API::Geo, api: true do
get api('/geo/status'), nil, request.headers get api('/geo/status'), nil, request.headers
expect(response).to have_http_status(200) expect(response).to have_http_status(200)
expect(response.headers['Content-Type']).to eq('application/json') expect(response).to match_response_schema('geo_node_status')
end end
it 'responds with a 404 when the tracking database is disabled' do it 'responds with a 404 when the tracking database is disabled' do
......
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