Files
podman/test/apiv2/27-containersEvents.at
Matthew Heon 6ee582315b Events for containers in pods now include the pod's ID
This allows tools like Cockpit to know that the pod in question
has also been updated, so they can refresh the list of containers
in the pod.

Fixes #15408

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2022-09-22 14:18:56 -04:00

32 lines
891 B
Bash

# -*- 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'
t GET "libpod/events?stream=false&since=$START" 200 \
'select(.status | contains("start")).Action=start' \
'select(.status | contains("start")).HealthStatus=null'\
# 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