docker-py/tests
Sebastiaan van Stijn 7168e09b16
test: fix for cgroupv2 (#2940)
This test was verifying that the container has the right options set (through
`docker inspect`), but also checks if the cgroup-rules are set within the
container by reading `/sys/fs/cgroup/devices/devices.list`

Unlike cgroups v1, on cgroups v2, there is no file interface, and rules are
handled through ebpf, which means that the test will fail because this file
is not present.

From the Linux documentation for cgroups v2:
https://github.com/torvalds/linux/blob/v5.16/Documentation/admin-guide/cgroup-v2.rst#device-controller

> (...)
> Device controller manages access to device files. It includes both creation of
> new device files (using mknod), and access to the existing device files.
>
> Cgroup v2 device controller has no interface files and is implemented on top
> of cgroup BPF. To control access to device files, a user may create bpf programs
> of type BPF_PROG_TYPE_CGROUP_DEVICE and attach them to cgroups with
> BPF_CGROUP_DEVICE flag. (...)

Given that setting the right cgroups is not really a responsibility of this SDK,
it should be sufficient to verify that the right options were set in the container
configuration, so this patch is removing the part that checks the cgroup, to
allow this test to be run on a host with cgroups v2 enabled.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-26 12:06:51 -04:00
..
gpg-keys Make dockerpycreds part of the SDK under docker.credentials 2019-04-30 23:37:55 -07:00
integration test: fix for cgroupv2 (#2940) 2022-07-26 12:06:51 -04:00
ssh use python3.6+ constructs 2021-07-05 18:30:07 -04:00
ssh-keys Shell out to SSH client for an ssh connection 2020-10-13 10:42:38 +02:00
unit utils: fix IPv6 address w/ port parsing (#3006) 2022-07-26 11:35:44 -04:00
Dockerfile Shell out to SSH client for an ssh connection 2020-10-13 10:42:38 +02:00
Dockerfile-dind-certs Remove support to pre python 3.6 2021-03-22 10:18:23 -03:00
Dockerfile-ssh-dind Fix ssh connection - don't override the host and port of the http pool 2020-11-18 14:44:24 +01:00
__init__.py Create tests module for setuptools test support 2013-07-13 01:07:04 -05:00
helpers.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00