summaryrefslogtreecommitdiffhomepage
path: root/runsc/container
diff options
context:
space:
mode:
authorLantao Liu <lantaol@google.com>2018-09-20 16:58:36 -0700
committerShentubot <shentubot@google.com>2018-09-20 16:59:42 -0700
commit8a938a3f9df631667c5f9e5d4a2185207e492a0d (patch)
tree101c63596570ec0c95ffdd0de1ccbb09cf6d67fb /runsc/container
parentcbaec4d61454f7426d14b44bf25c67282251453c (diff)
runsc: allow `runsc wait` on a container for multiple times.
PiperOrigin-RevId: 213908919 Change-Id: I74eff99a5360bb03511b946f4cb5658bb5fc40c7
Diffstat (limited to 'runsc/container')
-rw-r--r--runsc/container/multi_container_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/runsc/container/multi_container_test.go b/runsc/container/multi_container_test.go
index 0df587e30..2867aa3b9 100644
--- a/runsc/container/multi_container_test.go
+++ b/runsc/container/multi_container_test.go
@@ -152,8 +152,8 @@ func TestMultiContainerWait(t *testing.T) {
} else if es := ws.ExitStatus(); es != 0 {
t.Errorf("process %s exited with non-zero status %d", c.Spec.Process.Args, es)
}
- if _, err := c.Wait(); err == nil {
- t.Errorf("wait for stopped process %s should fail", c.Spec.Process.Args)
+ if _, err := c.Wait(); err != nil {
+ t.Errorf("wait for stopped container %s shouldn't fail: %v", c.Spec.Process.Args, err)
}
}(containers[1])
}
@@ -239,8 +239,8 @@ func TestExecWait(t *testing.T) {
} else if es := ws.ExitStatus(); es != 0 {
t.Fatalf("process %s exited with non-zero status %d", containers[1].Spec.Process.Args, es)
}
- if _, err := containers[1].Wait(); err == nil {
- t.Fatalf("wait for stopped process %s should fail", containers[1].Spec.Process.Args)
+ if _, err := containers[1].Wait(); err != nil {
+ t.Fatalf("wait for stopped container %s shouldn't fail: %v", containers[1].Spec.Process.Args, err)
}
// Execute another process in the first container.