Merge pull request #25385 from panekj/patch-1

Fix reporting summed image size for compat endpoint
This commit is contained in:
openshift-merge-bot[bot]
2025-02-27 14:39:49 +00:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@ -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,

View File

@ -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'