docker-py/tests/integration
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
..
credentials Don't install mock backport 2021-10-11 23:06:12 +03:00
testdata/dummy-plugin Add create_plugin implementation 2017-02-09 17:58:05 -08:00
__init__.py Remove unused files 2015-11-12 11:21:37 -08:00
api_build_test.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00
api_client_test.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00
api_config_test.py Merge branch 'master' into feat/add_templating_parameter_docker_config 2021-10-07 23:29:03 +02:00
api_container_test.py test: fix for cgroupv2 (#2940) 2022-07-26 12:06:51 -04:00
api_exec_test.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00
api_healthcheck_test.py Update alpine version to 3.10, and rename BUSYBOX variable 2019-08-10 19:11:58 +02:00
api_image_test.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00
api_network_test.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00
api_plugin_test.py Update tests to properly dispose of client instances in tearDown 2018-11-01 15:24:22 -07:00
api_secret_test.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00
api_service_test.py Merge pull request #2809 from feliperuhland/add-service-capability 2021-10-08 00:01:28 +02:00
api_swarm_test.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00
api_volume_test.py Refuse API version < 1.21 ; Remove associated code paths 2018-01-31 14:42:01 -08:00
base.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00
client_test.py Allow cancelling the streams from other threads 2018-03-20 09:25:29 +01:00
conftest.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00
context_api_test.py add test for context load without orchestrator 2020-06-02 10:50:03 +02:00
errors_test.py Update alpine version to 3.10, and rename BUSYBOX variable 2019-08-10 19:11:58 +02:00
models_containers_test.py Change use_config_proxy default value to True to match CLI behavior 2019-05-01 20:52:01 -07:00
models_images_test.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00
models_networks_test.py Fixing integration tests 2017-11-19 21:03:07 +00:00
models_nodes_test.py Use unambiguous advertise-addr when initializing a swarm 2017-11-07 15:18:26 -08:00
models_resources_test.py Allow configuring API version for integration test with env var 2017-01-25 16:52:26 -08:00
models_services_test.py Add `CapabilityAdd` and `CapabilityDrop` to 2021-04-07 22:11:52 +02:00
models_swarm_test.py Add test for join on already joined swarm 2019-05-01 10:24:50 +02:00
models_volumes_test.py Allow configuring API version for integration test with env var 2017-01-25 16:52:26 -08:00
regression_test.py use python3.6+ constructs 2021-07-05 18:30:07 -04:00