e2e/container: containerExistsWithStatus - t is unused (unparam)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Родитель
b83545ebbc
Коммит
6205ef33be
|
@ -26,17 +26,17 @@ func TestSigProxyWithTTY(t *testing.T) {
|
|||
assert.NilError(t, err, "failed to start container")
|
||||
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
|
||||
t.Logf("terminating PID %d", pid)
|
||||
err = syscall.Kill(pid, syscall.SIGTERM)
|
||||
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 {
|
||||
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))
|
||||
|
|
Загрузка…
Ссылка в новой задаче