mirror of
https://github.com/containers/podman.git
synced 2025-05-17 06:59:07 +08:00
Fix reporting summed image size for compat endpoint
Signed-off-by: Jakub Panek <me@panekj.dev>
This commit is contained in:
@ -89,7 +89,7 @@ func GetDiskUsage(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
utils.WriteResponse(w, http.StatusOK, handlers.DiskUsage{DiskUsage: docker.DiskUsage{
|
||||
LayersSize: 0,
|
||||
LayersSize: df.ImagesSize,
|
||||
Images: imgs,
|
||||
Containers: ctnrs,
|
||||
Volumes: vols,
|
||||
|
@ -34,6 +34,10 @@ t POST containers/create Image=$IMAGE Volumes='{"/test":{}}' HostConfig='{"Binds
|
||||
.Id~[0-9a-f]\\{64\\}
|
||||
cid=$(jq -r '.Id' <<<"$output")
|
||||
|
||||
# Verify image takes size
|
||||
t GET system/df 200 '.LayersSize=12180391'
|
||||
t GET libpod/system/df 200 '.ImagesSize=12180391'
|
||||
|
||||
# Verify that one container references the volume
|
||||
t GET system/df 200 '.Volumes[0].UsageData.RefCount=1'
|
||||
|
||||
|
Reference in New Issue
Block a user