-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12643 from leahneukirchen/events-compat
legacy events: also set Action="die"
- Loading branch information
Showing
2 changed files
with
29 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 |