Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/e2e/fixtures/hooks/poststart/compose-error.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:

test:
image: alpine
image: nginx
post_start:
- command: sh -c 'echo env'
- command: sh -c 'command in error'
3 changes: 1 addition & 2 deletions pkg/e2e/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ func TestPostStartHookInError(t *testing.T) {

res := c.RunDockerComposeCmdNoCheck(t, "-f", "fixtures/hooks/poststart/compose-error.yaml", "--project-name", projectName, "up", "-d")
res.Assert(t, icmd.Expected{ExitCode: 1})
assert.Assert(t, strings.Contains(res.Combined(), "Error response from daemon: container"), res.Combined())
assert.Assert(t, strings.Contains(res.Combined(), "is not running"), res.Combined())
assert.Assert(t, strings.Contains(res.Combined(), "test hook exited with status 127"), res.Combined())
}

func TestPostStartHookSuccess(t *testing.T) {
Expand Down