-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For Status = "die", Docker sets the exit code of the container to a field "exitCode". Podman uses "containerExitCode". Copy the value into "exitCode" as well, for compatibility. Signed-off-by: Leah Neukirchen <[email protected]>
- Loading branch information
1 parent
a1ebde1
commit 116a276
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- sh -*- | ||
# | ||
# test container-related events | ||
# | ||
|
||
podman pull $IMAGE &>/dev/null | ||
|
||
# Ensure clean slate | ||
podman rm -a -f &>/dev/null | ||
|
||
START=$(date +%s) | ||
|
||
podman run $IMAGE false || true | ||
|
||
# libpod api | ||
t GET "libpod/events?stream=false&since=$START" 200 \ | ||
'select(.status | contains("start")).Action=start' \ | ||
'select(.status | contains("died")).Action=died' \ | ||
'select(.status | contains("died")).Actor.Attributes.containerExitCode=1' | ||
|
||
# compat api, uses status=die (#12643) | ||
t GET "events?stream=false&since=$START" 200 \ | ||
'select(.status | contains("start")).Action=start' \ | ||
'select(.status | contains("die")).Action=die' \ | ||
'select(.status | contains("die")).Actor.Attributes.exitCode=1' | ||
|
||
# vim: filetype=sh |