summaryrefslogtreecommitdiff
path: root/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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>
* Add support for volume_driver in HostConfigJoffrey F2017-04-052-9/+27
| | | | | | Some cleanup in ContainerConfig + warning if volume_driver is provided (API>1.20) Signed-off-by: Joffrey F <joffrey@docker.com>
* Fix test issuesappveyorJoffrey F2017-03-291-43/+37
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Set infinite timeout for the `events` methodJoffrey F2017-03-271-3/+3
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Fix APIError status_code property for client/server errorsalex-dr2017-03-221-0/+65
| | | | | | | | | | | | | requests.Response objects evaluate as falsy when the status_code attribute is in the 400-500 range. Therefore we are assured that prior to this change, APIError would show `is_server_error() == False` when generated with a 500-level response and `is_client_error() == False` when generated with a 400-level response. This is not desirable. Added some seemingly dry (not DRY) unit tests to ensure nothing silly slips back in here. Signed-off-by: alex-dr <alex@datarobot.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>
* Merge pull request #1467 from crierr/masterJoffrey F2017-02-221-0/+5
|\ | | | | Allow port range like 8000-8010:80
| * Allow port range like 8000-8010:80crierr2017-02-201-0/+5
| | | | | | | | Signed-off-by: SeungJin Oh <crierr@naver.com>
* | Merge pull request #1473 from Anvil/event-http-headersJoffrey F2017-02-211-3/+6
|\ \ | | | | | | Allow events daemon command to read config.json
| * | Fixed events command related unit tests by passing a timeout valueDamien Nadé2017-02-211-3/+6
| |/ | | | | | | Signed-off-by: Damien Nadé <github@livna.org>
* | Add ability to set 'Hostname' on a Service.Nils Krabshuis2017-02-191-2/+3
|/ | | | Signed-off-by: Nils Krabshuis <nils.krabshuis@redwood.com>
* Merge pull request #1449 from shin-/secrets-apiJoffrey F2017-02-152-4/+4
|\ | | | | Implement secrets API
| * Add tests for secret API implementationJoffrey F2017-02-132-4/+4
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Add support for recursive wildcard pattern in .dockerignoreJoffrey F2017-02-141-3/+13
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Fix passing volumes to run with no host pathBen Firshman2017-02-071-1/+11
| | | | | | | | | Technically we shouldn't be passing them as binds, but the daemon doesn't seem to mind. Fixes #1380 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Fix volume path passed by run to create_containerBen Firshman2017-02-071-1/+3
| | | | | | | | | | | | Seems like this is pretty much ignored by Docker, so it wasn't causing any visible issues, except when a volume name was used instead of a path. Also, added integration tests. Ref #1380 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Merge pull request #1341 from pacoxu/patch-1Joffrey F2017-01-302-3/+16
|\ | | | | Scope is added in volume after docker 1.12
| * Scope is added in volume after docker 1.12徐俊杰2016-12-082-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: pacoxu <paco.xu@daocloud.io> add ut test for volume scope and no specified name create Signed-off-by: Paco Xu <paco.xu@daocloud.io> try to fix ut failure of volume creation Signed-off-by: Paco Xu <paco.xu@daocloud.io> try to fix ut failure of volume creation Signed-off-by: Paco Xu <paco.xu@daocloud.io> Scope is added in volume after docker 1.12 Signed-off-by: pacoxu <paco.xu@daocloud.io> Scope is added in volume after docker 1.12 Signed-off-by: pacoxu <paco.xu@daocloud.io>
* | Ignore socket files in utils.tarJoffrey F2017-01-241-0/+15
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Convert mode argument to valid structure in create_service1388-format-service-modeJoffrey F2017-01-191-2/+31
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Merge pull request #1393 from aebm/masterJoffrey F2017-01-191-0/+5
|\ \ | | | | | | Fix #1351
| * | Fix #1351Alejandro E. Brito Monedero2017-01-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | * Fix TypeError when getting the tags property from an image that has no tags. Ex: An image pulled by cryptohash. It is handled like when the image doesn't have defined the RepoTags member. Signed-off-by: Alejandro E. Brito Monedero <alejandro.monedero@gmail.com>
* | | Merge pull request #1347 from fcurella/hashBen Firshman2017-01-181-0/+14
|\ \ \ | |/ / |/| | Make resources hashable, so that they can be added to `set`s
| * | Make resources hashable, so that they can be added to `set`sFlavio Curella2016-12-081-0/+14
| |/ | | | | | | Signed-off-by: Flavio Curella <flavio.curella@gmail.com>
* | Detect mount type in parse_mount_string1376-parse-mount-typeJoffrey F2017-01-091-12/+37
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Additional parse_mount_string testsJoffrey F2017-01-092-18/+32
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Merge branch 'dz-fix-mount_options' of https://github.com/dzimine/docker-py ↵Joffrey F2017-01-091-0/+16
|\ \ | | | | | | | | | | | | | | | into dzimine-dz-fix-mount_options Signed-off-by: Joffrey F <joffrey@docker.com>
| * | Fix readonly in mounts.Dmitri2016-12-281-0/+16
| |/ | | | | Signed-off-by: Dmitri Zimine dz@stackstorm.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>
* Merge pull request #1331 from aanand/fix-auth-config-path-windowsJoffrey F2016-12-021-0/+53
|\ | | | | Fix auth config path on Windows
| * Fix auth config path on WindowsAanand Prasad2016-12-021-0/+53
| | | | | | | | | | | | | | The Engine client looks *only* at the USERPROFILE environment variable on Windows, so we should do that too. Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
* | Merge pull request #1315 from bfirsh/rename-docker-py-to-docker-sdk-pythonJoffrey F2016-12-021-1/+1
|\ \ | | | | | | Start to rename docker-py to docker-sdk-python
| * | Start to rename docker-py to docker-sdk-pythonBen Firshman2016-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pretty much everything except renaming the GitHub repo and documentation, which is not actually done yet. Nearer the release we can do a search/replace for all that stuff. Ref #1310 Signed-off-by: Ben Firshman <ben@firshman.co.uk>