Commit Graph

14 Commits

Author SHA1 Message Date
Yong Tang ab1f90a379 Cleanup containers during the tests
This fix tries to clean up the containers during the tests
so that no pre-existing volumes left in docker integration tests.

This fix adds `-v` when removing containers, and makes sure
containers launched in non-daemon mode are removed.

This fix is realted to moby PR 36292

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-23 15:22:42 +00:00
Yong Tang cbbc37ac7b Clean up created volume from test_run_with_named_volume
This fix adds the volume id to the list so that it could be
cleaned up on test teardown.

The issue was originally from https://github.com/moby/moby/pull/36292
where an additional `somevolume` pre-exists in tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-14 13:01:16 +00:00
Joffrey F 7fabcdaa4c Update wait to always return a dict
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-31 16:52:26 -08:00
Joffrey F 3422211309 Use pytest asserts
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-30 14:26:24 -08:00
Joffrey F 6e6eaece81 Return tuple instead of dict in exec_run
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-26 14:21:23 -08:00
Joffrey F b0cc4b5520 Merge branch 'add_exit_code_to_exec_run' of https://github.com/hnq90/docker-py into hnq90-add_exit_code_to_exec_run 2018-01-26 14:13:15 -08:00
Joffrey F 2250fa2ebd Don't attempt to retrieve container's stderr if `auto_remove` was set
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-19 13:50:32 -08:00
Joffrey F 6b8dfe4249 Retrieve container logs before container exits / is removed
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-14 16:53:44 -08:00
HuyNQ 436306f09d
Add exit code to exec_run
Signed-off-by: HuyNQ <huy@huynq.net>
2017-11-13 14:11:21 +07:00
Artem Bolshakov 62fda980e4 client.containers.run returns None if none of json-file or journald logging drivers used
Signed-off-by: Artem Bolshakov <either.free@gmail.com>
2017-08-17 13:38:40 -07:00
Joffrey F 95297dc2e7 Replace erroneous networks argument in containers.run with singular
network equivalent.

Small docfixes

Signed-off-by: Joffrey F <joffrey@docker.com>
2017-05-12 14:28:27 -07:00
Ben Firshman 956fe1cac1
Fix volume path passed by run to create_container
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>
2017-02-07 19:22:35 +01:00
Joffrey F a1d550a14c Allow configuring API version for integration test with env var
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-25 16:52:26 -08:00
Ben Firshman 1984f68730
Add new user-focused API
See #1086

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:05:43 +00:00