summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2021-08-04 09:53:58 +0000
committerGitHub <noreply@github.com>2021-08-04 09:53:58 +0000
commit1bc8c94409c1c9dc47b4569833af534beba9333f (patch)
tree722448d98c733e7db10bf44b6ff3cfc80a632175 /test
parent1ed91065b9356a2e5a07303b8d454268b83ee0f1 (diff)
parent9cc974c9637554620248941642d58ff34df90ba0 (diff)
downloadpodman-1bc8c94409c1c9dc47b4569833af534beba9333f.tar.gz
podman-1bc8c94409c1c9dc47b4569833af534beba9333f.tar.bz2
podman-1bc8c94409c1c9dc47b4569833af534beba9333f.zip
Merge pull request #11104 from jwhonce/bz/1988252
Only support containers stats using cgroups v2
Diffstat (limited to 'test')
-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.