summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorJake Correnti <jcorrenti13@gmail.com>2022-07-01 15:50:43 -0400
committerJake Correnti <jcorrenti13@gmail.com>2022-07-05 07:38:08 -0400
commit4fe7b8baf2a7f7916653adb0784f5ef15a112ec2 (patch)
tree0fbf9257cdab5a1565c5e1cd1e94bff2d0f254d3 /test/e2e
parentc66a489b75b7bc68c341f0ff39d7beef95569878 (diff)
downloadpodman-4fe7b8baf2a7f7916653adb0784f5ef15a112ec2.tar.gz
podman-4fe7b8baf2a7f7916653adb0784f5ef15a112ec2.tar.bz2
podman-4fe7b8baf2a7f7916653adb0784f5ef15a112ec2.zip
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>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/system_df_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/e2e/system_df_test.go b/test/e2e/system_df_test.go
index 5a23fc0bb..f41a5981f 100644
--- a/test/e2e/system_df_test.go
+++ b/test/e2e/system_df_test.go
@@ -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())
+ })
})