aboutsummaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-08-02 15:18:54 -0700
committerMatthew Heon <matthew.heon@pm.me>2021-08-10 20:37:47 -0400
commita82006160e6abbddc62f28999bca8865e5ea4806 (patch)
tree45481f28803fd65050856c2d77a0b619a3f0d39a /test/apiv2
parentc836ffe5bce748f215d0649f052df026fc6d8d62 (diff)
downloadpodman-a82006160e6abbddc62f28999bca8865e5ea4806.tar.gz
podman-a82006160e6abbddc62f28999bca8865e5ea4806.tar.bz2
podman-a82006160e6abbddc62f28999bca8865e5ea4806.zip
Only support containers stats using cgroups v2
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1988252 Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'test/apiv2')
-rw-r--r--test/apiv2/20-containers.at10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index c5b2f5ec1..610d3e36d 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -65,6 +65,16 @@ t GET libpod/containers/json?last=1 200 \
cid=$(jq -r '.[0].Id' <<<"$output")
+if root; then
+ t GET libpod/containers/stats?containers='[$cid]' 200
+else
+ if have_cgroupsv2; then
+ t GET libpod/containers/stats?containers='[$cid]' 200
+ else
+ t GET libpod/containers/stats?containers='[$cid]' 409
+ fi
+fi
+
t DELETE libpod/containers/$cid 204
# Issue #6799: it should be possible to start a container, even w/o args.