e2e/container: containerExistsWithStatus - t is unused (unparam)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-10-29 01:44:16 +01:00
parent b83545ebbc
commit 6205ef33be
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 3 additions and 3 deletions

View File

@ -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))