diff --git a/container_test.go b/container_test.go index 77429081e..d78650efe 100644 --- a/container_test.go +++ b/container_test.go @@ -273,6 +273,11 @@ func TestContainerExec(t *testing.T) { close(finished) }() + if err := task.Start(ctx); err != nil { + t.Error(err) + return + } + // start an exec process without running the original container process info processSpec := spec.Process withExecExitStatus(processSpec, 6) @@ -367,6 +372,11 @@ func TestContainerPids(t *testing.T) { statusC <- status }() + if err := task.Start(ctx); err != nil { + t.Error(err) + return + } + pid := task.Pid() if pid <= 0 { t.Errorf("invalid task pid %d", pid) @@ -847,6 +857,11 @@ func TestContainerExecNoBinaryExists(t *testing.T) { } defer task.Delete(ctx) + if err := task.Start(ctx); err != nil { + t.Error(err) + return + } + finished := make(chan struct{}, 1) go func() { if _, err := task.Wait(ctx); err != nil {