summaryrefslogtreecommitdiffhomepage
path: root/runsc/specutils/specutils_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/specutils/specutils_test.go')
-rw-r--r--runsc/specutils/specutils_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/runsc/specutils/specutils_test.go b/runsc/specutils/specutils_test.go
index 959be3af3..2dc5d90cc 100644
--- a/runsc/specutils/specutils_test.go
+++ b/runsc/specutils/specutils_test.go
@@ -76,8 +76,11 @@ func TestWaitForReadyNotRunning(t *testing.T) {
err := WaitForReady(cmd.Process.Pid, 5*time.Second, func() (bool, error) {
return false, nil
})
- if !strings.Contains(err.Error(), "not running") {
- t.Errorf("ProcessWaitReady got: %v, expected: not running", err)
+ if err != nil && !strings.Contains(err.Error(), "terminated") {
+ t.Errorf("ProcessWaitReady got: %v, expected: process terminated", err)
+ }
+ if err == nil {
+ t.Errorf("ProcessWaitReady incorrectly succeeded")
}
}