moby--moby/integration/container
Sebastiaan van Stijn 5861a0db22
Fix container update resetting pidslimit on older API clients
Older API clients did not use a pointer for `PidsLimit`, so
API requests would always send `0`, resulting in any previous
value to be reset after an update:

Before this patch:

(using a 17.06 Docker CLI):

```bash
docker run -dit --name test --pids-limit=16 busybox
docker container inspect --format '{{json .HostConfig.PidsLimit}}' test
16

docker container update --memory=100M --memory-swap=200M test

docker container inspect --format '{{json .HostConfig.PidsLimit}}' test
0

docker container exec test cat /sys/fs/cgroup/pids/pids.max
max
```

With this patch applied:

(using a 17.06 Docker CLI):

```bash
docker run -dit --name test --pids-limit=16 busybox
docker container inspect --format '{{json .HostConfig.PidsLimit}}' test
16

docker container update --memory=100M --memory-swap=200M test

docker container inspect --format '{{json .HostConfig.PidsLimit}}' test
16

docker container exec test cat /sys/fs/cgroup/pids/pids.max
16
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-24 16:32:32 +01:00
..
container_test.go API: properly handle invalid JSON to return a 400 status 2018-11-06 21:30:44 +01:00
copy_test.go Windows: Start of enabling tests under integration/ 2018-09-26 12:28:22 -07:00
create_test.go Capabilities refactor 2019-01-22 21:50:41 +02:00
daemon_linux_test.go Improve consistency in "skip" 2019-01-07 13:56:46 +01:00
diff_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
exec_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
export_test.go Improve consistency in "skip" 2019-01-07 13:56:46 +01:00
health_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
inspect_test.go Windows: Start of enabling tests under integration/ 2018-09-26 12:28:22 -07:00
ipcmode_linux_test.go Simplify skip checks 2019-01-07 13:56:57 +01:00
kill_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
links_linux_test.go Improve consistency in "skip" 2019-01-07 13:56:46 +01:00
logs_test.go Improve consistency in "skip" 2019-01-07 13:56:46 +01:00
main_test.go
mounts_linux_test.go Simplify skip checks 2019-01-07 13:56:57 +01:00
nat_test.go Improve consistency in "skip" 2019-01-07 13:56:46 +01:00
pause_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
ps_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
remove_test.go Improve consistency in "skip" 2019-01-07 13:56:46 +01:00
rename_test.go Improve consistency in "skip" 2019-01-07 13:56:46 +01:00
resize_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
restart_test.go Test: Replace NewClient() with NewClientT() 2018-12-22 15:53:02 +01:00
run_linux_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
stats_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
stop_linux_test.go Fix some minor wording / issues 2019-01-07 13:57:01 +01:00
stop_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
stop_windows_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
update_linux_test.go Fix container update resetting pidslimit on older API clients 2019-02-24 16:32:32 +01:00
update_test.go Integration: use testenv.APIClient() 2019-01-03 11:53:41 +01:00
wait_test.go