MCPcopy Create free account
hub / github.com/docker/cli / containerStatus

Function containerStatus

e2e/container/kill_test.go:33–44  ·  view source on GitHub ↗
(t *testing.T, containerID, status string)

Source from the content-addressed store, hash-verified

31}
32
33func containerStatus(t *testing.T, containerID, status string) func(poll.LogT) poll.Result {
34 t.Helper()
35 return func(poll.LogT) poll.Result {
36 result := icmd.RunCommand("docker", "inspect", "-f", "{{ .State.Status }}", containerID)
37 result.Assert(t, icmd.Success)
38 actual := strings.TrimSpace(result.Stdout())
39 if actual == status {
40 return poll.Success()
41 }
42 return poll.Continue("expected status %s != %s", status, actual)
43 }
44}

Callers 1

TestKillContainerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…