summaryrefslogtreecommitdiff
path: root/pkg/hooks/exec/exec_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-09 02:32:52 -0800
committerGitHub <noreply@github.com>2019-01-09 02:32:52 -0800
commit0a7373e802bbc56fa4574fca51005c576a7e04da (patch)
tree490ce40fdae6b792135c3de93ee586314eedfae0 /pkg/hooks/exec/exec_test.go
parentc9d63fe89d0a79b069b56249aaa4c168b47649c0 (diff)
parent99e642d9409aef2fadb21546444d3a6a92604124 (diff)
downloadpodman-0a7373e802bbc56fa4574fca51005c576a7e04da.tar.gz
podman-0a7373e802bbc56fa4574fca51005c576a7e04da.tar.bz2
podman-0a7373e802bbc56fa4574fca51005c576a7e04da.zip
Merge pull request #1830 from wking/config-filter-hooks
hooks: Add pre-create hooks for runtime-config manipulation
Diffstat (limited to 'pkg/hooks/exec/exec_test.go')
-rw-r--r--pkg/hooks/exec/exec_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/hooks/exec/exec_test.go b/pkg/hooks/exec/exec_test.go
index 62e45ff3a..7aac315cb 100644
--- a/pkg/hooks/exec/exec_test.go
+++ b/pkg/hooks/exec/exec_test.go
@@ -163,14 +163,14 @@ func TestRunCancel(t *testing.T) {
name: "context timeout",
contextTimeout: time.Duration(1) * time.Second,
expectedStdout: "waiting\n",
- expectedHookError: "^signal: killed$",
+ expectedHookError: "^executing \\[sh -c echo waiting; sleep 2; echo done]: signal: killed$",
expectedRunError: context.DeadlineExceeded,
},
{
name: "hook timeout",
hookTimeout: &one,
expectedStdout: "waiting\n",
- expectedHookError: "^signal: killed$",
+ expectedHookError: "^executing \\[sh -c echo waiting; sleep 2; echo done]: signal: killed$",
expectedRunError: context.DeadlineExceeded,
},
} {
@@ -207,7 +207,7 @@ func TestRunKillTimeout(t *testing.T) {
}
hookErr, err := Run(ctx, hook, []byte("{}"), nil, nil, time.Duration(0))
assert.Equal(t, context.DeadlineExceeded, err)
- assert.Regexp(t, "^(failed to reap process within 0s of the kill signal|signal: killed)$", hookErr)
+ assert.Regexp(t, "^(failed to reap process within 0s of the kill signal|executing \\[sh -c sleep 1]: signal: killed)$", hookErr)
}
func init() {