Commit 7d5e9ef6 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'fj-224657-include-snippets-size-in-group-statistics' into 'master'

Add snippets_size to Group entity

See merge request gitlab-org/gitlab!35585
parents dbbbae23 0aeef0af
---
title: Add snippets_size to Group entity
merge_request: 35585
author:
type: changed
...@@ -94,7 +94,8 @@ GET /groups?statistics=true ...@@ -94,7 +94,8 @@ GET /groups?statistics=true
"wiki_size" : 100, "wiki_size" : 100,
"lfs_objects_size" : 123, "lfs_objects_size" : 123,
"job_artifacts_size" : 57, "job_artifacts_size" : 57,
"packages_size": 0 "packages_size": 0,
"snippets_size" : 50,
} }
} }
] ]
......
...@@ -31,6 +31,7 @@ module API ...@@ -31,6 +31,7 @@ module API
expose :wiki_size expose :wiki_size
expose :lfs_objects_size expose :lfs_objects_size
expose :build_artifacts_size, as: :job_artifacts_size expose :build_artifacts_size, as: :job_artifacts_size
expose :snippets_size
end end
end end
end end
......
...@@ -184,11 +184,12 @@ RSpec.describe API::Groups do ...@@ -184,11 +184,12 @@ RSpec.describe API::Groups do
it "includes statistics if requested" do it "includes statistics if requested" do
attributes = { attributes = {
storage_size: 1158, storage_size: 2392,
repository_size: 123, repository_size: 123,
wiki_size: 456, wiki_size: 456,
lfs_objects_size: 234, lfs_objects_size: 234,
build_artifacts_size: 345 build_artifacts_size: 345,
snippets_size: 1234
}.stringify_keys }.stringify_keys
exposed_attributes = attributes.dup exposed_attributes = attributes.dup
exposed_attributes['job_artifacts_size'] = exposed_attributes.delete('build_artifacts_size') exposed_attributes['job_artifacts_size'] = exposed_attributes.delete('build_artifacts_size')
......
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