summaryrefslogtreecommitdiff
path: root/tests/unit/utils_test.py
Commit message (Collapse)AuthorAgeFilesLines
* Correctly support absolute paths in .dockerignorec5672-dockerignore-abspathJoffrey F2018-02-121-10/+17
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge pull request #1901 from docker/1899-create_archive_fixJoffrey F2018-02-051-2/+6
|\ | | | | Rewrite access check in create_archive with EAFP
| * Rewrite access check in create_archive with EAFP1899-create_archive_fixJoffrey F2018-02-051-2/+6
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Add workaround for bpo-32713c5618-negative-mtime-tarJoffrey F2018-02-011-0/+12
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Improve separation between auth_configs and general_configsimprove_authconfig_genconfig_separationJoffrey F2018-01-301-2/+2
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge pull request #1881 from docker/pytest-assertsJoffrey F2018-01-301-162/+141
|\ | | | | Use pytest asserts
| * Use pytest assertspytest-assertsJoffrey F2018-01-301-162/+141
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Do not break when archiving broken symlinks1841-tar-broken-symlinksJoffrey F2018-01-291-0/+26
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Commit d798afca made changes for the handling of '**' patterns inVeli-Matti Lintu2017-08-221-0/+17
| | | | | | | | .dockerignore. This causes an IndexError with patterns ending with '**', e.g. 'subdir/**'. This adds a missing boundary check before checking for trailing '/'. Signed-off-by: Veli-Matti Lintu <veli-matti.lintu@nosto.com>
* Leading slash in .dockerignore should be ignoredJoffrey F2017-08-171-0/+5
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Generating regexp from .dockerignore file in a similar way as docker-ce.Jakub Goszczurny2017-08-171-0/+25
| | | | Signed-off-by: Jakub Goszczurny <szczurmys@o2.pl>
* split_port should not break when passed a non-string argumentJoffrey F2017-06-281-0/+3
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Add a specific unit test for splitting port with IPv6kaiyou2017-06-051-0/+6
| | | | | | The test was copied from https://github.com/greybyte/docker-py/commit/ccec87ca2c2aacfcfe3b38c5bc7d59dd73551c51 Signed-off-by: kaiyou <pierre@jaury.eu>
* Fix test issuesappveyorJoffrey F2017-03-291-43/+37
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Raise an error when passing an empty string to split_portJoffrey F2017-03-091-0/+3
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* fix: Missing exception handling in split_port when no container portLei Gong2017-03-091-0/+4
| | | | | | | | | | "localhost:host_port:" case will raise TypeError exception directly Catch the "TypeError" and give proper error message * docker/utils/ports.py Signed-off-by: Lei Gong <xue177125184@gmail.com>
* Allow port range like 8000-8010:80crierr2017-02-201-0/+5
| | | | Signed-off-by: SeungJin Oh <crierr@naver.com>
* Add support for recursive wildcard pattern in .dockerignoreJoffrey F2017-02-141-3/+13
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Ignore socket files in utils.tarJoffrey F2017-01-241-0/+15
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Accept / as a path separator in dockerignore patterns on all platformscompose-4302-dockerignore-windowsJoffrey F2017-01-061-0/+18
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Move config type creation from docker.utils functions to classes inconfig_typesJoffrey F2016-12-011-243/+5
| | | | | | docker.types Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge pull request #1277 from ↵Ben Firshman2016-11-291-1/+75
|\ | | | | | | | | bodnarbm/do-not-traverse-ignored-directories-with-no-potential-exceptions Do not traverse excluded directories that are not prefixes of dockerignore exceptions.
| * Add unit tests for should_check_directory.Brandon Bodnar2016-11-261-1/+75
| | | | | | | | Signed-off-by: Brandon Bodnar <bodnarbm@gmail.com>
* | Merge pull request #1297 from docker/stepanstipl-allow_custom_pid_modeJoffrey F2016-11-281-0/+13
|\ \ | | | | | | Allow custom pid mode
| * | Re-enable pid_mode checks for API < 1.24stepanstipl-allow_custom_pid_modeJoffrey F2016-11-281-0/+13
| |/ | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Fix parsing for an environment file with newlinesJon Cotton2016-11-281-1/+9
|/ | | | | | Fixes the new, purposely broken test added in the previous commit. Signed-off-by: Jon Cotton <jc@finaltransfer.net>
* Rename Client to APIClientBen Firshman2016-11-221-8/+7
| | | | Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Drop support for Python 2.6Ben Firshman2016-11-221-18/+17
| | | | | | | Because it's ancient. If you're still using it, you can use an old version of docker-py. Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Merge pull request #1236 from docker/host_config_isolationJoffrey F2016-11-171-1/+12
|\ | | | | Add support for isolation param in host config
| * Add support for isolation param in host confighost_config_isolationJoffrey F2016-09-291-1/+12
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Update tests to avoid failures on Windows platformsJoffrey F2016-10-141-53/+87
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Merge pull request #1256 from docker/format_env_unicode_bugJoffrey F2016-10-131-2/+17
|\ \ | | | | | | Do not break when calling format_environment with unicode values
| * | Do not break when calling format_environment with unicode valuesformat_env_unicode_bugJoffrey F2016-10-121-2/+17
| |/ | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Remove trailing slashes in result of utils.parse_hostbase_url_trailing_slashJoffrey F2016-10-121-0/+5
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Docs and tests for pids_limit.aiden0z-masterJoffrey F2016-08-231-0/+9
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* support MemoryReservation and KernelMemoryKay Yan2016-08-231-0/+14
| | | | Signed-off-by: Kay Yan <kay.yan@daocloud.io>
* Merge branch 'master' of https://github.com/srikalyan/docker-py into ↵Joffrey F2016-08-231-1/+10
|\ | | | | | | srikalyan-master
| * Added support for user namespace.Srikalyan Swayampakula2016-06-301-1/+10
| | | | | | | | Signed-off-by: Srikalyan Swayampakula <srikalyansswayam@gmail.com>
* | Implemented dns_opt support (from api 1.21)George Lester2016-08-071-0/+13
| | | | | | | | Signed-off-by: George Lester <glester491@gmail.com>
* | Avoid crashing in update_headers decorator when headers kwarg is None1148-update-headers-fixJoffrey F2016-08-021-1/+34
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Add support for IPv6 docker host connections.1135-ipv6-docker-hostJoffrey F2016-07-271-1/+9
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Default to npipe address on WindowsAanand Prasad2016-07-261-2/+2
|/ | | | Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
* Merge pull request #1066 from yunzhu-li/blkio-controlJoffrey F2016-06-151-0/+19
|\ | | | | Add support for Block IO constraints in HostConfig
| * Add support for Block IO constraints in HostConfigyunzhu-li2016-06-051-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | This adds support for Block IO constraint options: - blkio-weight - blkio-weight-device - device-read-bps - device-write-bps - device-read-iops - device-write-iops Signed-off-by: yunzhu-li <contact@yunzhu.li>
* | Update parse_host and testsJoffrey F2016-06-021-4/+3
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* support Python 3.5Thomas Grainger2016-05-191-51/+19
| | | | Signed-off-by: Thomas Grainger <tom.grainger@procensus.com>
* Resolve path traversal in .dockerignore patternsAanand Prasad2016-05-161-0/+8
| | | | Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
* Merge pull request #1004 from klj613/allow-equals-character-in-env-fileJoffrey F2016-04-271-0/+8
|\ | | | | makes it possible to have '=' in the env file
| * makes it possible to have '=' in the env fileKristian Lewis Jones2016-03-221-0/+8
| | | | | | | | | | | | note that the docker command line flag --env-file also allows '=' in the env file Signed-off-by: Kristian Lewis Jones <klj613@kristianlewisjones.com>
* | Tests for match_hostname backportJoffrey F2016-03-291-17/+0
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>