Commit Graph

434 Commits

Author SHA1 Message Date
Anca Iordache daa9f179c3
Merge pull request #2671 from aiordache/default_tag
Set image default tag on pull
2020-10-16 11:35:16 +02:00
aiordache 180414dcbb Shell out to SSH client for an ssh connection
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-13 10:42:38 +02:00
aiordache cec152db5f Set image default tag on pull
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-09-16 17:36:50 +02:00
Sebastiaan van Stijn 26d8045ffa Fix CreateContainerTest.test_invalid_log_driver_raises_exception
This test was updated in 7d92fbdee1, but
omitted the "error" prefix in the message, causing the test to fail;

    _________ CreateContainerTest.test_invalid_log_driver_raises_exception _________
    tests/integration/api_container_test.py:293: in test_invalid_log_driver_raises_exception
        assert excinfo.value.explanation in expected_msgs
    E   AssertionError: assert 'error looking up logging plugin asdf: plugin "asdf" not found' in ["logger: no log driver named 'asdf' is registered", 'looking up logging plugin asdf: plugin "asdf" not found']
    E    +  where 'error looking up logging plugin asdf: plugin "asdf" not found' = APIError(HTTPError('400 Client Error: Bad Request for url: http+docker://localhost/v1.39/containers/create')).explanation
    E    +    where APIError(HTTPError('400 Client Error: Bad Request for url: http+docker://localhost/v1.39/containers/create')) = <ExceptionInfo APIError tblen=6>.value

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-17 15:59:12 +02:00
Ulysses Souza 74a0734d37
Merge pull request #2551 from haboustak/2550-add-driveropts-to-endpointconfig
Add support for DriverOpts in EndpointConfig
2020-07-02 10:51:35 +02:00
aiordache 7133916798 add test for context load without orchestrator
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-06-02 10:50:03 +02:00
Mike Haboustak df7bf5f5e0
Add support for DriverOpts in EndpointConfig
Docker API 1.32 added support for providing options to a network driver
via EndpointConfig when connecting a container to a network.

Signed-off-by: Mike Haboustak <haboustak@gmail.com>
2020-04-30 05:27:45 -04:00
Wilson Júnior 7d92fbdee1
Fix tests to support both log plugin feedbacks
Signed-off-by: Wilson Júnior <wilsonpjunior@gmail.com>
Docker-DCO-1.1-Signed-off-by: Wilson Júnior <wilsonpjunior@gmail.com> (github: wpjunior)
2020-04-21 17:00:48 -03:00
Sebastiaan van Stijn da90bb3259
xfail "docker top" tests, and adjust for alpine image
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-17 10:25:53 +01:00
Anca Iordache 64fdb32ae8 Implement context management, lifecycle and unittests.
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2020-02-05 14:49:42 +01:00
Sebastiaan van Stijn 940805dde6
Fix ImageCollectionTest.test_pull_multiple flakiness
The ImageCollectionTest.test_pull_multiple test performs a `docker pull` without
a `:tag` specified) to pull all tags of the given repository (image).

After pulling the image, the image(s) pulled are checked to verify if the list
of images contains the `:latest` tag.

However, the test assumes that all tags of the image are tags for the same
version of the image (same digest), and thus a *single* image is returned, which
is not always the case.

Currently, the `hello-world:latest` and `hello-world:linux` tags point to a
different digest, therefore the `client.images.pull()` returns multiple images:
one image for digest, making the test fail:

    =================================== FAILURES ===================================
    ____________________ ImageCollectionTest.test_pull_multiple ____________________
    tests/integration/models_images_test.py:90: in test_pull_multiple
        assert len(images) == 1
    E   AssertionError: assert 2 == 1
    E    +  where 2 = len([<Image: 'hello-world:linux'>, <Image: 'hello-world:latest'>])

This patch updates the test to not assume a single image is returned, and instead
loop through the list of images and check if any of the images contains the
`:latest` tag.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-06 13:46:23 +01:00
Yuval Goldberg 656db96b4a Fix mac_address connect usage in network functions && addind appropriate test
Signed-off-by: Yuval Goldberg <yuvigoldi@hotmail.com>
2019-12-19 15:43:03 +02:00
Sebastiaan van Stijn 53469e0dd3
Fix broken test due to BUSYBOX -> TEST_IMG rename
The BUSYBOX variable was renamed to TEST_IMG in
54b48a9b7a, however
0ddf428b6c got merged
after that change, but was out of date, and therefore
caused the tests to fail:

```
=================================== FAILURES ===================================
________ ServiceTest.test_create_service_with_network_attachment_config ________
tests/integration/api_service_test.py:379: in test_create_service_with_network_attachment_config
    container_spec = docker.types.ContainerSpec(BUSYBOX, ['true'])
E   NameError: global name 'BUSYBOX' is not defined
```

Fix the test by using the correct variable name.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-30 00:14:20 +02:00
Joffrey F 8fea5738d3
Merge pull request #2333 from hannseman/network-attachment-config
Add NetworkAttachmentConfig for service create/update
2019-08-27 00:21:27 -07:00
Sebastiaan van Stijn 54b48a9b7a
Update alpine version to 3.10, and rename BUSYBOX variable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-10 19:11:58 +02:00
Joffrey F 17c86429e4
Merge pull request #2382 from thaJeztah/fix_platform_tests
Adjust `--platform` tests for changes in docker engine
2019-07-18 22:49:54 -07:00
Sebastiaan van Stijn bc46490a68
Adjust `--platform` tests for changes in docker engine
These tests started failing on recent versions of the engine because the error string changed,
and due to a regression, the status code for one endpoint changed from a 400 to a 500.

On Docker 18.03:

The `docker build` case properly returns a 400, and "invalid platform" as error string;

```bash
docker build --platform=foobar -<<EOF
FROM busybox
EOF

Sending build context to Docker daemon  2.048kB
Error response from daemon: invalid platform: invalid platform os "foobar"
```

```
DEBU[2019-07-15T12:17:22.745511870Z] Calling GET /_ping
DEBU[2019-07-15T12:17:22.748224796Z] Calling POST /session
DEBU[2019-07-15T12:17:22.748692282Z] Calling POST /v1.37/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&platform=foobar&rm=1&session=d7b6ceba9d8d0aed67a805528554feb5285781fe888a4bf4e0c15cb09bffd614&shmsize=0&target=&ulimits=null
```

The `docker pull --platform=foobar hello-world:latest` case incorrectly returns a 500

```
DEBU[2019-07-15T12:16:08.744827612Z] Calling POST /v1.37/images/create?fromImage=hello-world&platform=foobar&tag=latest
DEBU[2019-07-15T12:16:08.745594874Z] FIXME: Got an API for which error does not match any expected type!!!: invalid platform: invalid platform os "foobar"  error_type="*errors.errorString" module=api
ERRO[2019-07-15T12:16:08.745916686Z] Handler for POST /v1.37/images/create returned error: invalid platform: invalid platform os "foobar"
DEBU[2019-07-15T12:16:08.746191172Z] FIXME: Got an API for which error does not match any expected type!!!: invalid platform: invalid platform os "foobar"  error_type="*errors.errorString" module=api
```

On Docker 18.09;

```bash
docker build --platform=foobar -<<EOF
FROM busybox
EOF

Error response from daemon: "foobar": unknown operating system or architecture: invalid argument
```

Which incorrectly returns a 500 status;

```
DEBU[2019-07-15T11:59:20.687268380Z] Calling POST /v1.39/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&platform=foobar&rm=1&session=jko7kejjvs93judyfnq7shoda&shmsize=0&target=&ulimits=null&version=1
DEBU[2019-07-15T11:59:20.687282279Z] Calling POST /session
INFO[2019-07-15T11:59:20.687761392Z] parsed scheme: ""                             module=grpc
INFO[2019-07-15T11:59:20.687833668Z] scheme "" not registered, fallback to default scheme  module=grpc
INFO[2019-07-15T11:59:20.688017578Z] ccResolverWrapper: sending new addresses to cc: [{ 0  <nil>}]  module=grpc
INFO[2019-07-15T11:59:20.688270160Z] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2019-07-15T11:59:20.688353083Z] pickfirstBalancer: HandleSubConnStateChange: 0xc4209b0630, CONNECTING  module=grpc
INFO[2019-07-15T11:59:20.688985698Z] pickfirstBalancer: HandleSubConnStateChange: 0xc4209b0630, READY  module=grpc
DEBU[2019-07-15T11:59:20.812700550Z] client is session enabled
DEBU[2019-07-15T11:59:20.813139288Z] FIXME: Got an API for which error does not match any expected type!!!: invalid argument
github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init
	/go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:40
github.com/docker/docker/vendor/github.com/containerd/containerd/content.init
	<autogenerated>:1
github.com/docker/docker/builder/builder-next.init
	<autogenerated>:1
github.com/docker/docker/api/server/backend/build.init
	<autogenerated>:1
main.init
	<autogenerated>:1
runtime.main
	/usr/local/go/src/runtime/proc.go:186
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:2361  error_type="*errors.fundamental" module=api
ERRO[2019-07-15T11:59:20.813210677Z] Handler for POST /v1.39/build returned error: "foobar": unknown operating system or architecture: invalid argument
DEBU[2019-07-15T11:59:20.813276737Z] FIXME: Got an API for which error does not match any expected type!!!: invalid argument
github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init
	/go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:40
github.com/docker/docker/vendor/github.com/containerd/containerd/content.init
	<autogenerated>:1
github.com/docker/docker/builder/builder-next.init
	<autogenerated>:1
github.com/docker/docker/api/server/backend/build.init
	<autogenerated>:1
main.init
	<autogenerated>:1
runtime.main
	/usr/local/go/src/runtime/proc.go:186
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:2361  error_type="*errors.fundamental" module=api
```

Same for the `docker pull --platform=foobar hello-world:latest` case:

```bash
docker pull --platform=foobar hello-world:latest
Error response from daemon: "foobar": unknown operating system or architecture: invalid argument
```

```
DEBU[2019-07-15T12:00:18.812995330Z] Calling POST /v1.39/images/create?fromImage=hello-world&platform=foobar&tag=latest
DEBU[2019-07-15T12:00:18.813229172Z] FIXME: Got an API for which error does not match any expected type!!!: invalid argument
github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init
	/go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:40
github.com/docker/docker/vendor/github.com/containerd/containerd/content.init
	<autogenerated>:1
github.com/docker/docker/builder/builder-next.init
	<autogenerated>:1
github.com/docker/docker/api/server/backend/build.init
	<autogenerated>:1
main.init
	<autogenerated>:1
runtime.main
	/usr/local/go/src/runtime/proc.go:186
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:2361  error_type="*errors.fundamental" module=api
ERRO[2019-07-15T12:00:18.813365546Z] Handler for POST /v1.39/images/create returned error: "foobar": unknown operating system or architecture: invalid argument
DEBU[2019-07-15T12:00:18.813461428Z] FIXME: Got an API for which error does not match any expected type!!!: invalid argument
github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init
	/go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:40
github.com/docker/docker/vendor/github.com/containerd/containerd/content.init
	<autogenerated>:1
github.com/docker/docker/builder/builder-next.init
	<autogenerated>:1
github.com/docker/docker/api/server/backend/build.init
	<autogenerated>:1
main.init
	<autogenerated>:1
runtime.main
	/usr/local/go/src/runtime/proc.go:186
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:2361  error_type="*errors.fundamental" module=api
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-07-15 15:48:06 +02:00
Sebastiaan van Stijn 1126ea9d6f
xfail test_init_swarm_data_path_addr
This test can fail if `eth0` has multiple IP addresses;

   E   docker.errors.APIError: 400 Client Error: Bad Request ("interface eth0 has more than one IPv6 address (2001:db8:1::242:ac11:2 and fe80::42:acff:fe11:2)")

Which is not a failiure, but depends on the environment that
the test is run in.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-07-12 22:50:35 +02:00
Michael Crosby 8303884612 Remove exec detach test
Forking off an exec process and detaching isn't a supported method

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-06-25 13:08:39 -04:00
Ulysses Souza ccd9ca4947 Xfail test_attach_stream_and_cancel on TLS
This test is quite flaky on ssl integration test

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-05-18 19:33:48 -07:00
Hannes Ljungberg 0ddf428b6c Add NetworkAttachmentConfig type
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-05-03 22:27:32 +02:00
Joffrey F 87ee18aa39 Change use_config_proxy default value to True to match CLI behavior
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-05-01 20:52:01 -07:00
Joffrey F 836194c64f
Merge pull request #2295 from hannseman/swarm-rotate-token
Add support for rotate_manager_unlock_key
2019-05-01 20:36:45 -07:00
Joffrey F 75e0ad017c
Merge pull request #2328 from docker/modernize_test_deps
Update some test dependencies / default values with newer versions
2019-05-01 02:48:05 -07:00
Hannes Ljungberg 532c62ee51 Add support for rotate_manager_unlock_key
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-05-01 11:45:20 +02:00
Joffrey F eba8345c37 Update some test dependencies / default values with newer versions
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-05-01 02:36:19 -07:00
Joffrey F 4d62dd0a64
Merge pull request #2296 from hannseman/swarm-init-response
Return node id on swarm init
2019-05-01 02:29:30 -07:00
Joffrey F 9682422718
Merge pull request #2303 from hannseman/swarm-DataPathAddr
Add support for swarm DataPathAddr
2019-05-01 02:22:06 -07:00
Joffrey F cc13b82e9f
Merge pull request #2222 from docker/vendor_dockerpycreds
Make dockerpycreds part of the SDK under docker.credentials
2019-05-01 01:39:54 -07:00
Hannes Ljungberg 110c6769c9 Add test for join on already joined swarm
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-05-01 10:24:50 +02:00
Hannes Ljungberg c7b9cae0a0 Add swarm support for data_addr_path
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-05-01 10:24:50 +02:00
Hannes Ljungberg acd7a8f430 Return node id on swarm init
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-05-01 10:24:02 +02:00
Joffrey F 1a4881acd9 Improve low_timeout test resilience
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-05-01 01:15:41 -07:00
Joffrey F 34ffc56865 Streaming TTY messages sometimes get truncated. Handle gracefully in demux tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-05-01 00:59:35 -07:00
Joffrey F 62c8bcbbb6 Increase timeout on test with long sleeps
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-05-01 00:47:16 -07:00
Joffrey F 073a21c28a Separate into individual tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-05-01 00:20:40 -07:00
Joffrey F b06e437da8 Avoid demux test flakiness
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-04-30 23:47:09 -07:00
Joffrey F a823acc2ca Make dockerpycreds part of the SDK under docker.credentials
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-04-30 23:37:55 -07:00
Joffrey F 0287cd9f2e
Merge pull request #2309 from thaJeztah/remove_init_path_create
Remove init_path from create
2019-04-30 23:37:06 -07:00
Joffrey F 1aaa76dc5b
Merge pull request #2297 from hannseman/service-init
Add support for setting init on services
2019-04-14 15:07:47 -07:00
Sebastiaan van Stijn 50d475797a
Remove init_path from create
This option was never functional, and was not intended
to be added to the "container create" API, so let's
remove it, because it has been removed in Docker 17.05,
and was broken in versions before that; see

- https://github.com/moby/moby/issues/32355 --init-path does not seem to work
- https://github.com/moby/moby/pull/32470 remove --init-path from client

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-04-10 02:42:23 +02:00
Ulysses Souza ef043559c4 Add 'sleep 2' to avoid race condition on attach
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-04-04 14:09:18 +02:00
Ulysses Souza 1b572a4340
Merge pull request #1882 from larkost/1743-container-ports
add ports to containers
2019-04-03 11:20:02 +02:00
Hannes Ljungberg 0d5aacc464 Add support for setting init on services
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-03-28 16:03:48 +01:00
Ulysses Souza d1f7979f24 Refactor and add tests
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-26 17:28:49 +01:00
Karl Kuehn 4890864d65 add ports to containers
Signed-off-by: Karl Kuehn <kuehn.karl@gmail.com>
2019-03-26 16:55:45 +01:00
Ulysses Souza 15862eacbf Xfail test_attach_stream_and_cancel on TLS
This test is quite flaky on ssl integration test

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-26 16:04:06 +01:00
Ian Campbell c1fea8ee4a
Merge pull request #2288 from hannseman/container-run-create-volume_driver
Move volume_driver to RUN_HOST_CONFIG_KWARGS
2019-03-25 12:24:54 +00:00
Ian Campbell d38c7246a4
Merge pull request #2287 from hannseman/swarm-default-addr-pool-redux
Redux added arguments to create a swarm with a custom address pool and subnet size.
2019-03-25 12:01:15 +00:00
Ian Campbell 5abf671442
Merge pull request #2282 from ulyssessouza/avoid-race-condition-on-autoremove
Avoid race condition on short execution
2019-03-25 12:00:28 +00:00
Ulysses Souza 8f42dd1484 Avoid race condition on short execution
- Add a sleep of 2 seconds to be sure the logs
can be requested before the daemon removes the
container when run with auto_remove=True

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-03-25 12:42:54 +01:00
Hannes Ljungberg 523371e21d Move volume_driver to RUN_HOST_CONFIG_KWARGS
Fixes #2271

Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-03-23 20:57:23 +01:00
Barry Shapira d6cc972cd9 Split monolithic integration tests into individual tests.
The integration tests require restarting the swarm once for each
test.  I had done so manually with self.init_swarm(force_new_cluster=True)
but that wasn't resetting the swarm state correctly.  The usual
test teardown procedure cleans up correctly.

Signed-off-by: Barry Shapira <barry@whiterabbit.ai>
2019-03-22 10:40:27 +01:00
Barry Shapira 781dc30ad4 Check API version before setting swarm addr pool.
Also corrected a documentation error: the default API version from
constants is currently 1.35, not 1.30 as was sometimes listed.

Signed-off-by: Barry Shapira <barry@whiterabbit.ai>

Removed accidental whitespace.

Signed-off-by: Barry Shapira <barry@whiterabbit.ai>
2019-03-22 10:40:27 +01:00
Barry Shapira 5d69a0a62e Added arguments to creeate a swarm with a custom address pool and subnet size.
Signed-off-by: Barry Shapira <barry@whiterabbit.ai>
2019-03-22 10:38:13 +01:00
Hannes Ljungberg 7143cf02ab Test port lookup with protocols
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-03-18 22:15:49 +01:00
Hannes Ljungberg d429a823ed Make PlacementPreference build correct context
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-01-18 21:50:31 +01:00
Joffrey F a579e9e205 Remove use_config_proxy from exec. Add use_config_proxy docs to DockerClient
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-01-09 14:45:13 -08:00
Sebastiaan van Stijn 219c52141e
Regression 443 test: relax status-code check
This test was testing for a 500 status, but this status
is actually a bug in the API (as it's due to an invalid
request), and the API should actually return a 400 status.

To make this test handle both situations, relax the test
to accept either a 4xx or 5xx status.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-09 21:23:11 +01:00
Joffrey F 65bebc085a Style fixes and removed some unused code
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-01-09 11:30:58 -08:00
Corentin Henry 2c4a8651a8 By default, disable proxy support
This is to avoid a breaking change

Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2019-01-09 11:30:58 -08:00
Corentin Henry 0d37390c46 add integration tests for proxy support
Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2019-01-09 11:30:58 -08:00
Joffrey F 72f4f527ad Update test dependencies to latest version, fix some flake8 errors
Signed-off-by: Joffrey F <joffrey@docker.com>
2019-01-09 11:18:40 -08:00
Corentin Henry 7b3b83dfdb fix exec api inconsistency
Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-28 15:16:23 -08:00
Corentin Henry 76447d0ca3 tests various exec_create/exec_start combinations
Test the interation of the tty, demux and stream parameters

Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-28 13:37:17 -08:00
Corentin Henry 5f157bbaca implement stream demultiplexing for exec commands
fixes https://github.com/docker/docker-py/issues/1952

Signed-off-by: Corentin Henry <corentinhenry@gmail.com>
2018-11-27 17:01:48 -08:00
Joffrey F e237c0ea16 Add named parameter to image.save to identify which repository name to use in the resulting tarball
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-06 14:46:37 -08:00
Joffrey F 6bfe2005e0 Clear error for cancellable streams over SSH
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:24:22 -07:00
Joffrey F 94aa9a89f7 Update tests to properly dispose of client instances in tearDown
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:24:22 -07:00
Joffrey F 1df021ee24 Update tests for ssh protocol compatibility
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:24:22 -07:00
Joffrey F a3111d9e00 Add xfail to ignore 18.09 beta bug
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-10-31 18:05:26 -07:00
Joffrey F 82445764e0 Add support for RollbackConfig
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-08-09 16:41:25 -07:00
Joffrey F 14524f19e2 Add version checks and test
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-08-09 15:56:11 -07:00
Marco Trillo 098318ad95 Add support for `uts_mode` parameter in `Client.create_host_config`.
This parameter allows to set the UTS namespace of the container, as in
the `--uts=X` Docker CLI parameter:
<https://docs.docker.com/engine/reference/run/#uts-settings---uts>
The only allowed value, if set, is "host".

Signed-off-by: Marco Trillo <martri@arantia.com>
Signed-off-by: Diego Alvarez <dyako.developer@gmail.com>
2018-06-29 14:54:49 +02:00
Joffrey F 8c35eee0fb Fix support for legacy .dockercfg auth config format
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-06-27 17:04:32 -07:00
Joffrey F b4efdc1b28 Fix several integration tests on Windows
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-05-25 10:11:02 -07:00
Joffrey F 95ad903c35 Fix create_plugin on Windows
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-05-25 10:11:02 -07:00
Joffrey F 17f41b5672 Avoid unwanted modification of dockerfile path
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-05-25 10:11:02 -07:00
Joffrey F 827bd98d07 Merge branch 'master' of github.com:docker/docker-py 2018-04-25 16:30:24 -07:00
Joffrey F 8360ecae97 prune_builds test
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-25 16:29:41 -07:00
Joffrey F ae8f77737c Fix session timeout = None case
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-25 15:31:26 -07:00
Joffrey F da028d88a2 Total timeout should be HTTP timeout + operation timeout
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-25 15:31:26 -07:00
Matthieu Nottale cef9940ed3 stop(), restart(): Adjust request timeout.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-04-25 15:31:26 -07:00
Joffrey F 1d6f8ecf92 Support absolute paths for in-context Dockerfiles
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-12 13:22:47 -07:00
Joffrey F 16751ac509 Properly handle relative Dockerfile paths and Dockerfile on different drives
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-30 11:00:41 -07:00
Joffrey F 9ff787cb5f Add methods for /distribution/<name>/json endpoint
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-29 15:45:06 -07:00
Joffrey F 081b78f15e Support building with Dockerfile outside of context
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-27 11:12:05 -07:00
Joffrey F c88db80f01 Add isolation param to build
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-23 14:14:49 +01:00
Joffrey F 284c3d90d6 Remove redundant single-socket select call
Clean up + use pytest-timeout

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-20 09:25:29 +01:00
Viktor Adam 719d4e9e20 Allow cancelling the streams from other threads
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2018-03-20 09:25:29 +01:00
Joffrey F 90c0dbe5f8 Add test for container list with sparse=True
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-14 16:53:56 -07:00
Joffrey F 13609359ac Improve dockerignore comment test
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-05 11:49:43 -08:00
Wanzhi Du 74586cdd4c Fix flake8 case
Signed-off-by: Wanzhi Du <wanzhi09@gmail.com>
2018-03-05 19:26:56 +08:00
Wanzhi Du 7a28ff3510 Ignore comment line from the .dockerignore file
This fixed the bug that test comment line in .dockerignore file as ignore rule
bug.

Add test for "# comment" patterns in .dockerignore.

Signed-off-by: Wanzhi Du <wanzhi09@gmail.com>
2018-03-05 18:10:09 +08:00
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
Joffrey F ad5f49b690
Merge pull request #1918 from rycus86/service-restart-method
Shorthand method for service.restart()
2018-02-21 12:05:10 -08:00
Viktor Adam e54e8f4199 Shorthand method for service.force_update()
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2018-02-21 19:55:17 +00:00
Joffrey F 8fd9d3c99e GenericResources was introduced in 1.32
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-20 17:11:27 -08:00
Joffrey F 9b6b306e17 Code cleanup and version guards
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-20 16:25:17 -08:00
William Myers 820de848fa Add support for generic resources to docker.types.Resources
- Add support for dict and list generic_resources parameter
- Add generic_resources integration test

Signed-off-by: William Myers <mwilliammyers@gmail.com>
2018-02-20 16:25:17 -08:00