github.com/containers/podman/v5@v5.1.0-rc1/test/apiv2/19-stats.at (about)

     1  # -*- sh -*-
     2  #
     3  # test 'stats' endpoints
     4  #
     5  
     6  if root; then
     7      podman run -dt --name container1 --cpuset-cpus=0 $IMAGE top &>/dev/null
     8  
     9      # regression for https://github.com/containers/podman/issues/15754
    10      t GET libpod/containers/container1/stats?stream=false 200 .cpu_stats.online_cpus=1
    11  fi
    12  
    13  podman run -dt --name testctr1 $IMAGE top &>/dev/null
    14  
    15  t GET libpod/containers/testctr1/stats?stream=false 200 '.networks | length'=1
    16  
    17  podman rm -f testctr1
    18  
    19  podman network create testnet1
    20  podman network create testnet2
    21  
    22  podman run -dt --name testctr2 --net testnet1,testnet2 $IMAGE top &>/dev/null
    23  
    24  t GET libpod/containers/testctr2/stats?stream=false 200 '.networks | length'=2
    25  
    26  podman rm -f testctr2
    27  
    28  podman network rm testnet1
    29  podman network rm testnet2