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-15 12:28:20 +02:00
parent 54bf220a16
commit d1c76198ba
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

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,