mirror of
https://github.com/containers/podman.git
synced 2025-08-23 09:18:19 +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{
|
utils.WriteResponse(w, http.StatusOK, handlers.DiskUsage{DiskUsage: docker.DiskUsage{
|
||||||
LayersSize: 0,
|
LayersSize: df.ImagesSize,
|
||||||
Images: imgs,
|
Images: imgs,
|
||||||
Containers: ctnrs,
|
Containers: ctnrs,
|
||||||
Volumes: vols,
|
Volumes: vols,
|
||||||
|
@ -34,6 +34,10 @@ t POST containers/create Image=$IMAGE Volumes='{"/test":{}}' HostConfig='{"Binds
|
|||||||
.Id~[0-9a-f]\\{64\\}
|
.Id~[0-9a-f]\\{64\\}
|
||||||
cid=$(jq -r '.Id' <<<"$output")
|
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
|
# Verify that one container references the volume
|
||||||
t GET system/df 200 '.Volumes[0].UsageData.RefCount=1'
|
t GET system/df 200 '.Volumes[0].UsageData.RefCount=1'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user