mirror of https://github.com/docker/cli.git
e2e/container: containerExistsWithStatus - t is unused (unparam)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
b83545ebbc
commit
6205ef33be
|
@ -26,17 +26,17 @@ func TestSigProxyWithTTY(t *testing.T) {
|
||||||
assert.NilError(t, err, "failed to start container")
|
assert.NilError(t, err, "failed to start container")
|
||||||
defer icmd.RunCommand("docker", "container", "rm", "-f", t.Name())
|
defer icmd.RunCommand("docker", "container", "rm", "-f", t.Name())
|
||||||
|
|
||||||
poll.WaitOn(t, containerExistsWithStatus(t, t.Name(), "running"), poll.WithDelay(100*time.Millisecond), poll.WithTimeout(5*time.Second))
|
poll.WaitOn(t, containerExistsWithStatus(t.Name(), "running"), poll.WithDelay(100*time.Millisecond), poll.WithTimeout(5*time.Second))
|
||||||
|
|
||||||
pid := cmd.Process.Pid
|
pid := cmd.Process.Pid
|
||||||
t.Logf("terminating PID %d", pid)
|
t.Logf("terminating PID %d", pid)
|
||||||
err = syscall.Kill(pid, syscall.SIGTERM)
|
err = syscall.Kill(pid, syscall.SIGTERM)
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
|
||||||
poll.WaitOn(t, containerExistsWithStatus(t, t.Name(), "exited"), poll.WithDelay(100*time.Millisecond), poll.WithTimeout(5*time.Second))
|
poll.WaitOn(t, containerExistsWithStatus(t.Name(), "exited"), poll.WithDelay(100*time.Millisecond), poll.WithTimeout(5*time.Second))
|
||||||
}
|
}
|
||||||
|
|
||||||
func containerExistsWithStatus(t *testing.T, containerID, status string) func(poll.LogT) poll.Result {
|
func containerExistsWithStatus(containerID, status string) func(poll.LogT) poll.Result {
|
||||||
return func(poll.LogT) poll.Result {
|
return func(poll.LogT) poll.Result {
|
||||||
result := icmd.RunCommand("docker", "inspect", "-f", "{{ .State.Status }}", containerID)
|
result := icmd.RunCommand("docker", "inspect", "-f", "{{ .State.Status }}", containerID)
|
||||||
// ignore initial failures as the container may not yet exist (i.e., don't result.Assert(t, icmd.Success))
|
// ignore initial failures as the container may not yet exist (i.e., don't result.Assert(t, icmd.Success))
|
||||||
|
|
Loading…
Reference in New Issue