summaryrefslogtreecommitdiff
path: root/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* 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 sysctl when creating containerJari Takkala2016-08-011-0/+27
| | | | | | Closes #1144 Signed-off-by: Jari Takkala <jtakkala@gmail.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>
* Add unit testsKeerthan Reddy Mala2016-07-221-0/+26
| | | | Signed-off-by: Keerthan Reddy Mala <kmala@deis.com>
* Set custom user agent on clientBen Firshman2016-07-201-0/+30
| | | | Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Mock read_from_socket methodJoffrey F2016-07-131-1/+6
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Add hijack hints for non-detached exec api callsDavid Gageot2016-07-131-2/+30
| | | | Signed-off-by: David Gageot <david@gageot.net>
* volumes,create: support adding labelsTomas Tomecek2016-07-132-1/+20
| | | | | | Fixes #1102 Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
* Change double underscore in test case names for _set_auth_headersJustin Michalicek2016-07-121-3/+3
| | | | | | * Change test__set_auth_headers_* methods to test_set_auth_headers_* Signed-off-by: Justin Michalicek <jmichalicek@gmail.com>
* Update build unit testsJustin Michalicek2016-07-121-1/+60
| | | | | | | | | | | * Test that the request from build when the client has auth configs contains the correct X-Registry-Config header * Test that BuildApiMixin._set_auth_headers() updates the passed in headers dict with auth data from the client * Test that BuildApiMixin._set_auth_headers() leaves headers dict intact when there is no _auth_config on the client. Signed-off-by: Justin Michalicek <jmichalicek@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>
* Don't set socket timeout if it's already disabled when streamingKevin Frommelt2016-05-101-0/+44
| | | | Signed-off-by: Kevin Frommelt <kevin.frommelt@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>
* | Use backports.ssl_match_hostnameFelix Yan2016-04-081-3/+9
| | | | | | | | | | | | | | | | The py2-ipaddress module unfortunately conflicts with the pypi:ipaddress module, which is in the dependency tree of widely used pyOpenSSL. I think it would be a good idea to use a well maintained backport of the Python 3.5 implementation of match_hostname() instead of duplicating the effort and maintain another. All tests are passing here. Signed-off-by: Felix Yan <felixonmars@archlinux.org>
* | Don't raise InvalidConfigError when auth dict doesn't have an 'auth' keyJoffrey F2016-04-051-3/+2
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Tests for match_hostname backportJoffrey F2016-03-292-17/+73
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Merge branch 'master' of https://github.com/dimaspivak/docker-py into ↵Joffrey F2016-03-231-1/+2
|\ \ | | | | | | | | | dimaspivak-master
| * | Add support for changes param to ContainerApiMixin.commitDima Spivak2016-03-211-1/+2
| |/ | | | | | | | | | | docker commit --changes was added to Docker in 1.6.0. Signed-off-by: Dima Spivak <dima@spivak.ch>
* | Merge branch 'from_env' of https://github.com/bfirsh/docker-py into ↵Joffrey F2016-03-221-0/+26
|\ \ | | | | | | | | | bfirsh-from_env
| * | Add docker.from_env() shortcutBen Firshman2016-03-151-0/+26
| | | | | | | | | | | | | | | | | | A much neater way of getting started with docker-py. Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* | | Support OomScoreAdj in host configurationAditya Marella2016-03-221-0/+10
| | | | | | | | | | | | Signed-off-by: Aditya Marella <aditya.marella@gmail.com>
* | | Support passing an alternate environment dict to kwargs_from_envkwargs_from_env_altJoffrey F2016-03-211-0/+14
| |/ |/| | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | If tcp host is provided while TLS is enabled, convert to httpstcp-to-https-parsehostJoffrey F2016-03-171-1/+6
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Don't support tmpfs in API version < 1.22Aanand Prasad2016-03-161-0/+2
| | | | | | | | Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
* | Add unittest for the Tmpfs Hostconfig optionJan Losinski2016-03-161-0/+56
|/ | | | Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Fix enable_tls issue #984Joffrey F2016-03-111-13/+1
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge pull request #916 from docker/container_update_featureJoffrey F2016-02-242-0/+25
|\ | | | | Support for container limits update
| * Unit test for Client.update_container methodJoffrey F2016-02-232-0/+25
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Merge pull request #942 from seguins/934-separate-stream-follow-logsJoffrey F2016-02-241-4/+49
|\ \ | |/ |/| Separate params stream and follow for logs.
| * Separate params stream and follow for logs.Stéphane Seguin2016-02-161-4/+49
| | | | | | | | | | | | Closes #934 Signed-off-by: Stéphane Seguin <stephseguin93@gmail.com>
* | Fix TLS regressionsAanand Prasad2016-02-231-3/+1
|/ | | | | | | | | - Set `verify` to the CA cert path if one has been specified, rather than `True` - Don't set `assert_fingerprint` Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
* Merge pull request #928 from docker/926-ignored_dockerfilesJoffrey F2016-02-091-5/+17
|\ | | | | Never exclude Dockerfile from the build context.
| * Never exclude Dockerfile from the build context.926-ignored_dockerfilesJoffrey F2016-02-091-5/+17
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Don't break when parsing unknown config keys927-config-parsingJoffrey F2016-02-091-0/+29
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge pull request #920 from docker/ssl_version_simplerJoffrey F2016-02-051-0/+17
|\ | | | | Remove obsolete SSL version computation
| * Remove obsolete SSL version computationssl_version_simplerJoffrey F2016-02-031-0/+17
| | | | | | | | | | | | | | | | Recent versions of urllib3 (including the one packaged by requests) will automatically reject SSLv2/3. Additional test to check urllib3's behavior (mostly for release/packaging) Signed-off-by: Joffrey F <joffrey@docker.com>
* | Re-write kwargs_from_env to handle TLS options betterMike Dougherty2016-02-041-4/+51
| | | | | | | | | | | | | | | | This more closely matches the way the docker client interprets the relevant environment variables. Among other things, it's now possible to set DOCKER_TLS_VERIFY=false. Signed-off-by: Mike Dougherty <mike.dougherty@docker.com>
* | Add support for shm_size.Spencer Rinehart2016-02-041-0/+8
|/ | | | | | | --shm-size was added to Docker in 1.10 via docker/docker#16168. See docker/compose#2823 for more details. Signed-off-by: Spencer Rinehart <anubis@overthemonkey.com>
* Support unspecified protocol in base_url when using TLS894-docker_host_envJoffrey F2016-01-281-0/+5
| | | | | | (assume HTTPS) Signed-off-by: Joffrey F <joffrey@docker.com>
* Support links when creating containers or connecting to networksAanand Prasad2016-01-201-0/+2
| | | | Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
* Merge pull request #880 from docker/813-parse-float-bytesJoffrey F2016-01-181-5/+20
|\ | | | | Handle 64-bit integer values in parse_bytes
| * parse_bytes: Add ability to handle 64-bit integers in py2Joffrey F2016-01-181-5/+20
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Add HttpHeaders support in load_configPavel Kravchenko2016-01-181-0/+24
|/ | | | Signed-off-by: Pavel Kravchenko <kpavel@il.ibm.com>
* Improve host devices supportJoffrey F2016-01-181-1/+60
| | | | | | | | Add unit tests for utils.parse_devices Rewrite documentation Support dict and string format for device declaration Signed-off-by: Joffrey F <joffrey@docker.com>