mirror of
https://github.com/moby/moby.git
synced 2026-07-13 02:52:20 +00:00
These tests would panic; - in WithRLimits(), because HostConfig was not set;470ae8422f/daemon/oci_linux.go (L46-L47)- in daemon.mergeUlimits(), because daemon.configStore was not set;470ae8422f/daemon/oci_linux.go (L1069)This panic was not discovered because the current version of runc/libcontainer that we vendor would not always return false for `apparmor.IsEnabled()` when running docker-in-docker or if `apparmor_parser` is not found. Starting with v1.0.0-rc93 of libcontainer, this is no longer the case (changed inbfb4ea1b1b) This patch; - changes the tests to initialize Daemon.configStore and Container.HostConfig - Combines TestExecSetPlatformOpt and TestExecSetPlatformOptPrivileged into a new test (TestExecSetPlatformOptAppArmor) - Runs the test both if AppArmor is enabled and if not (in which case it tests that the container's AppArmor profile is left empty). - Adds a FIXME comment for a possible bug in execSetPlatformOpts, which currently prefers custom profiles over "privileged". Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2.6 KiB
2.6 KiB