Currently it doesn't actually seem to make any practical difference that this
is missing, but it seems like good practice to do so anyway, to be robust
against future test case changes which might require cleanup done in the super
class.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Each volume in the array holds a reference to a docker.client.Client object and
therefore a connection pool which leaves fds open once the test has completed.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
These hold a reference to a docker.client.Client object and therefore a
connection pool which leaves fds open once the test has completed.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This is a docker.client.Client and therefore contains a connection pool, so
each subclass of DockerClientTestCase can end up holding on to up to 10 Unix
socket file descriptors after the tests contained in the sub-class are
complete.
Before this by the end of a test run I was seeing ~100 open file descriptors,
~80 of which were Unix domain sockets. By cleaning these up only 15 Unix
sockets remain at the end (out of ~25 fds, the rest of which are the Python
interpretter, opened libraries etc).
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
self._project.client is a docker.client.Client, so creating a new self._project
leaks (via the embedded connection pool) a bunch of Unix socket file
descriptors for each test which overrides self.project using this mechanism.
In my tests I observed the test harness using 800-900 file descriptor, which is
OK on Linux with the default limit of 1024 but breaks on OSX (e.g. with
Docker4Mac) where the default limit is only 256. The failure can be provoked on
Linux too with `ulimit -n 256`.
With this fix I have observed the process ending with ~100 file descriptors
open, including 83 Unix sockets, so I think there is likely at least one more
leak lurking.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
- When no command is passed but `--entrypoint` is, set Cmd to `[]`
- When command is a single empty string, set Cmd to `[""]`
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Unset env vars passed to `run` via command line options take the
value of the system's var with the same name.
Signed-off-by: Joffrey F <joffrey@docker.com>
Fix the issue when build arg is set to None instead of empty string. Usecase:
cat docker-compose.yml
.... args:
- http_proxy
- https_proxy
- no_proxy
If http_proxy, https_proxy, no_proxy environment variables are not defined then http_proxy,
https_proxy, no_proxy build args will be set to string None which breaks all downloads
With this change undefined build args will be set to empty string instead of string None
Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>
Fix the issue when build arg is set to None instead of empty string. Usecase:
cat docker-compose.yml
.... args:
- http_proxy
- https_proxy
- no_proxy
If http_proxy, https_proxy, no_proxy environment variables are not defined then http_proxy,
https_proxy, no_proxy build args will be set to string None which breaks all downloads
With this change undefined build args will be set to empty string instead of string None
Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>
CLITestCase.test_events_human_readable fails due to
wrong assumption that host where tests were launched
will have the same date time as Docker daemon.
This fix introduces internal method for validating
timestamp in Docker logs
Signed-off-by: Denys Makogon <lildee1991@gmail.com>
Fix the issue when build arg is set to None instead of empty string.
Usecase:
cat docker-compose.yml
....
args:
- http_proxy
- https_proxy
- no_proxy
If http_proxy, https_proxy, no_proxy environment variables are not defined
then http_proxy, https_proxy, no_proxy build args will be set to string None which breaks all downloads
With this change build args will not passed to docker engine if they are equal to string None
Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>