Add missing attributes to Entity::GeoNodeStatus

parent d547754e
......@@ -779,12 +779,16 @@ module API
end
class GeoNodeStatus < Grape::Entity
expose :id
expose :health
expose :healthy?, as: :healthy
expose :repositories_count
expose :repositories_synced_count
expose :repositories_failed_count
expose :lfs_objects_count
expose :lfs_objects_synced_count
expose :attachments_count
expose :attachments_synced_count
end
class PersonalAccessToken < Grape::Entity
......
......@@ -37,7 +37,7 @@ module API
require_node_to_be_secondary!
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
# Enqueue a batch of IDs of wiki's projects to have their
......
......@@ -4,13 +4,13 @@
"id",
"healthy",
"health",
"attachments_count",
"attachments_synced_count",
"lfs_objects_count",
"lfs_objects_synced_count",
"lfs_objects_synced_in_percentage",
"repositories_count",
"repositories_failed_count",
"repositories_synced_count",
"repositories_synced_in_percentage"
"repositories_synced_count"
],
"properties" : {
"id": { "type": "integer" },
......
......@@ -293,7 +293,7 @@ describe API::Geo, api: true do
get api('/geo/status'), nil, request.headers
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
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