cli/command/formatter: TestContainerPsContext add test for State()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-05-16 01:13:13 +02:00
parent 54bf220a16
commit d1c76198ba
+8 -2
View File
@@ -106,11 +106,17 @@ func TestContainerPsContext(t *testing.T) {
call: ctx.Ports,
},
{
container: container.Summary{Status: "RUNNING"},
container: container.Summary{Status: "Up 123 seconds"},
trunc: true,
expValue: "RUNNING",
expValue: "Up 123 seconds",
call: ctx.Status,
},
{
container: container.Summary{State: container.StateRunning},
trunc: true,
expValue: container.StateRunning,
call: ctx.State,
},
{
container: container.Summary{SizeRw: 10},
trunc: true,