aboutsummaryrefslogtreecommitdiff
path: root/test/apiv2/27-containersEvents.at
blob: e0a66e0acb847fc93d736d7b1975b58cc1af0688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- 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='\

# 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