summaryrefslogtreecommitdiff
path: root/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1727 from mbelang/join-swarn-default-listen-addressJoffrey F2017-12-182-0/+49
|\ | | | | Add join_swarm default listen address
| * Add join_swarm default listen addressMaxime Belanger2017-08-292-0/+49
| | | | | | | | | | | | | | | | Since the docker CLI adds a default listen address (0.0.0.0:2377) when joining a node to the swarm, the docker-py api will support the same behavior to easy configuration. Signed-off-by: Maxime Belanger <maxime.b.belanger@gmail.com>
| * Commit d798afca made changes for the handling of '**' patterns inVeli-Matti Lintu2017-08-211-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>
| * Fix handling of non-multiplexed (TTY) streams over upgraded socketsJoffrey F2017-08-171-1/+1
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
| * Allow detach and remove for api version >= 1.25 and use auto_remove when ↵David Steines2017-08-151-0/+30
| | | | | | | | | | | | both are set. Continue raising an exception for api versions <1.25. Signed-off-by: David Steines <d.steines@gmail.com>
| * Leading slash in .dockerignore should be ignoredJoffrey F2017-08-151-0/+5
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
| * Return generator for output of load_image endpointJoffrey F2017-08-151-0/+14
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Merge pull request #1828 from pkit/fix_error_from_httpexJoffrey F2017-12-181-1/+15
|\ \ | | | | | | fixes create_api_error_from_http_exception()
| * | fixes create_api_error_from_http_exception()Constantine Peresypkin2017-12-181-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | `create_api_error_from_http_exception()` is never tested in the original code and will fail miserably when fed with empty `HTTPError` object see fixes in requests for this behaviour: https://github.com/requests/requests/pull/3179 Signed-off-by: Constantine Peresypkin <pconstantine@gmail.com>
* | | Retrieve container logs before container exits / is removed1813-run-autoremoveJoffrey F2017-12-142-5/+4
| | | | | | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | | Merge pull request #1807 from rycus86/update_service_from_prev_specJoffrey F2017-12-141-2/+2
|\ \ \ | | | | | | | | Update service from prev spec
| * | | Service model update changesViktor Adam2017-11-141-2/+2
| |/ / | | | | | | | | | Signed-off-by: Viktor Adam <rycus86@gmail.com>
* | | Merge branch 'master' of https://github.com/tz70s/docker-py into tz70s-masterJoffrey F2017-12-131-0/+22
|\ \ \ | | | | | | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
| * | | Fix #1575 - Add cpu_rt_period and cpu_rt_runtime argsTzu-Chiao Yeh2017-08-131-0/+22
| | |/ | |/| | | | | | | | | | | | | | | | Add cpu_rt_period and cpu_rt_runtime in hostconfig with version(1.25), types(int) checks. Also add version and type checks in dockertype unit test. Signed-off-by: Tzu-Chiao Yeh <su3g4284zo6y7@gmail.com>
| * | client.containers.run returns None if none of json-file or journald logging ↵Artem Bolshakov2017-08-072-1/+39
| | | | | | | | | | | | | | | | | | drivers used Signed-off-by: Artem Bolshakov <either.free@gmail.com>
| * | Generating regexp from .dockerignore file in a similar way as docker-ce.Jakub Goszczurny2017-08-011-0/+25
| | | | | | | | | | | | Signed-off-by: Jakub Goszczurny <szczurmys@o2.pl>
| * | Fix #1673 check resource error in container network APIMatthew Berry2017-07-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Container network functions checked 'image' as resource ID and not 'container'. This caused a traceback when using container as named argument. Signed-off-by: Matthew Berry <mtberry89@gmail.com>
| * | split_port should not break when passed a non-string argumentJoffrey F2017-06-281-0/+3
| | | | | | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | | Only allow greedy queries on the modelViktor Adam2017-11-211-4/+0
| | | | | | | | | | | | Signed-off-by: Viktor Adam <rycus86@gmail.com>
* | | Fetch network details with network lists greedilyViktor Adam2017-11-161-2/+6
| |/ |/| | | | | Signed-off-by: Viktor Adam <rycus86@gmail.com>
* | Do not interrupt streaming when encountering 0-length framesJoffrey F2017-11-071-1/+3
| | | | | | | | 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>
* | Fix handling of non-multiplexed (TTY) streams over upgraded socketsJoffrey F2017-08-171-1/+1
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Allow detach and remove for api version >= 1.25 and use auto_remove when ↵David Steines2017-08-171-0/+30
| | | | | | | | | | | | both are set. Continue raising an exception for api versions <1.25. Signed-off-by: David Steines <d.steines@gmail.com>
* | Leading slash in .dockerignore should be ignoredJoffrey F2017-08-171-0/+5
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Return generator for output of load_image endpointJoffrey F2017-08-171-0/+14
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | client.containers.run returns None if none of json-file or journald logging ↵Artem Bolshakov2017-08-172-1/+39
| | | | | | | | | | | | drivers used Signed-off-by: Artem Bolshakov <either.free@gmail.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>
* | Fix #1673 check resource error in container network APIMatthew Berry2017-08-171-3/+3
| | | | | | | | | | | | | | | | Container network functions checked 'image' as resource ID and not 'container'. This caused a traceback when using container as named argument. Signed-off-by: Matthew Berry <mtberry89@gmail.com>
* | split_port should not break when passed a non-string argumentJoffrey F2017-06-281-0/+3
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Support credHelpers section in config.json1633-credhelpers-supportJoffrey F2017-06-221-0/+51
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge pull request #1632 from kaiyou/masterJoffrey F2017-06-161-0/+6
|\ | | | | allow ipv6 :: notation in split_port (using re)
| * 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>
* | Raising error in case of invalid value of since kwarg on Container.logsChris Mark2017-06-161-0/+7
| | | | | | | | Signed-off-by: Chris Mark <chrismarkou92@gmail.com>
* | Ensure default timeout is used by API Clientgrahamlyons2017-06-081-0/+13
|/ | | | | | | | | | | The `from_env` method on the `docker` module passed `None` as the value for the `timeout` keyword argument which overrode the default value in the initialiser, taken from `constants` module. This sets the default in the initialiser to `None` and adds logic to set that, in the same way that `version` is handled. Signed-off-by: grahamlyons <graham@grahamlyons.com>
* Replace erroneous networks argument in containers.run with singular1433-run-networksJoffrey F2017-05-121-3/+2
| | | | | | | | network equivalent. Small docfixes Signed-off-by: Joffrey F <joffrey@docker.com>
* Include tag in images.get after pulling if provided separately1585-pull-tagJoffrey F2017-05-092-2/+2
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Add ContainerSpec mounts testJoffrey F2017-05-081-2/+18
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge branch 'add-env-support-to-exec' of ↵Joffrey F2017-05-021-1/+1
|\ | | | | | | | | | | https://github.com/TomasTomecek/docker-py into TomasTomecek-add-env-support-to-exec Signed-off-by: Joffrey F <joffrey@docker.com>
| * exec: add support for `Env`Tomas Tomecek2017-04-291-1/+1
| | | | | | | | Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
* | Fix typo s/CpuSetCpus/CpusetCpus/Dan Liew2017-05-012-2/+2
| | | | | | | | | | | | | | | | | | According to Docker's API documentation [1]. The parameter name is `CpusetCpus` not `CpuSetCpus`. [1] https://docs.docker.com/engine/api/v1.25/#operation/ContainerCreate Signed-off-by: Dan Liew <daniel.liew@imperial.ac.uk>
* | Add missing support for `CpusetMems` parameter to HostConfig.Dan Liew2017-05-011-0/+27
| | | | | | | | Signed-off-by: Dan Liew <daniel.liew@imperial.ac.uk>
* | Merge pull request #1570 from AlexeyRokhin/masterJoffrey F2017-04-282-0/+65
|\ \ | |/ |/| Add cpu_count, cpu_percent, nano_cpus parameters to container HostConfig.
| * cpus renamed to nano_cpus. Type and scale of nano_cpus are changed. Comments ↵Alexey Rokhin2017-04-282-10/+12
| | | | | | | | | | | | for new parameters are changed. Signed-off-by: Alexey Rokhin <arokhin@mail.ru>
| * Add cpu_count, cpu_percent, cpus parameters to container HostConfig.Alexey Rokhin2017-04-192-0/+63
| | | | | | | | Signed-off-by: Alexey Rokhin <arokhin@mail.ru>
* | Merge pull request #1493 from funkyfuture/model_propertiesJoffrey F2017-04-273-1/+17
|\ \ | | | | | | Adds a few model properties
| * | Adds an 'image' property to the container modelFrank Sachsenheim2017-04-151-0/+5
| | | | | | | | | | | | Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
| * | Adds a 'labels' property to the image modelFrank Sachsenheim2017-04-152-0/+6
| | | | | | | | | | | | Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
| * | Adds a 'labels' property to the container modelFrank Sachsenheim2017-04-152-1/+6
| |/ | | | | | | | | | | | | | | The Docker API seems to respond with a 'null' value for the 'Labels' attribute from containers that were created with older Docker versions. An empty dictionary is returned in this case. Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
* | Fix if replicas is set to 0, Fixes #1572Rob Kooper2017-04-261-0/+6
|/ | | | Signed-off-by: Rob Kooper <kooper@illinois.edu>