File: 19-stats.at

package info (click to toggle)
podman 5.7.0%2Bds2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,824 kB
  • sloc: sh: 4,700; python: 2,798; perl: 1,885; ansic: 1,484; makefile: 977; ruby: 42; csh: 8
file content (29 lines) | stat: -rw-r--r-- 753 bytes parent folder | download | duplicates (2)
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
# -*- sh -*-
#
# test 'stats' endpoints
#

if root; then
    podman run -dt --name container1 --cpuset-cpus=0 $IMAGE top &>/dev/null

    # regression for https://github.com/containers/podman/issues/15754
    t GET libpod/containers/container1/stats?stream=false 200 .cpu_stats.online_cpus=1
fi

podman run -dt --name testctr1 $IMAGE top &>/dev/null

t GET libpod/containers/testctr1/stats?stream=false 200 '.networks | length'=1

podman rm -f testctr1

podman network create testnet1
podman network create testnet2

podman run -dt --name testctr2 --net testnet1,testnet2 $IMAGE top &>/dev/null

t GET libpod/containers/testctr2/stats?stream=false 200 '.networks | length'=2

podman rm -f testctr2

podman network rm testnet1
podman network rm testnet2