Skip to content

Commit 1d981e2

Browse files
committed
Added a regression test for image size
Signed-off-by: Mohammed Affan <72978371+Affan-7@users.noreply.github.com>
1 parent 3566964 commit 1d981e2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cli/command/formatter/image_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ func TestImageContext(t *testing.T) {
4040
expValue: "10B",
4141
call: ctx.Size,
4242
},
43+
{
44+
imageCtx: imageContext{i: types.ImageSummary{Size: 999900000}, trunc: true},
45+
expValue: "999.9MB",
46+
call: ctx.Size,
47+
},
4348
{
4449
imageCtx: imageContext{i: types.ImageSummary{Created: unix}, trunc: true},
4550
expValue: time.Unix(unix, 0).String(), call: ctx.CreatedAt,

0 commit comments

Comments
 (0)