mirror of
https://github.com/containers/podman.git
synced 2025-06-22 01:48:54 +08:00
Podman system df JSON format outputs Size
and Reclaimable
Previously, `podman system df --format "{{json .}}"` would not output `Size` and `Reclaimable` like `podman system df` would. ``` {"Type":"Images","Total":5,"Active":0,"Size":39972240,"Reclaimable":39972240} {"Type":"Containers","Total":0,"Active":0,"Size":0,"Reclaimable":0} {"Type":"Local Volumes","Total":0,"Active":0,"Size":0,"Reclaimable":0} ``` Closes: #14769 Signed-off-by: Jake Correnti <jcorrenti13@gmail.com>
This commit is contained in:
@ -86,4 +86,17 @@ var _ = Describe("podman system df", func() {
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
})
|
||||
|
||||
It("podman system df --format \"{{ json . }}\"", func() {
|
||||
session := podmanTest.Podman([]string{"create", ALPINE})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
|
||||
session = podmanTest.Podman([]string{"system", "df", "--format", "{{ json . }}"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session.LineInOutputContains("Size"))
|
||||
Expect(session.LineInOutputContains("Reclaimable"))
|
||||
Expect(session.IsJSONOutputValid())
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user