Skip to content

Commit d1c7619

Browse files
committed
cli/command/formatter: TestContainerPsContext add test for State()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 54bf220 commit d1c7619

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

cli/command/formatter/container_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,17 @@ func TestContainerPsContext(t *testing.T) {
106106
call: ctx.Ports,
107107
},
108108
{
109-
container: container.Summary{Status: "RUNNING"},
109+
container: container.Summary{Status: "Up 123 seconds"},
110110
trunc: true,
111-
expValue: "RUNNING",
111+
expValue: "Up 123 seconds",
112112
call: ctx.Status,
113113
},
114+
{
115+
container: container.Summary{State: container.StateRunning},
116+
trunc: true,
117+
expValue: container.StateRunning,
118+
call: ctx.State,
119+
},
114120
{
115121
container: container.Summary{SizeRw: 10},
116122
trunc: true,

0 commit comments

Comments
 (0)