1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-12 19:38:57 +00:00

Catch a timeout error in docker

Fix #936
This commit is contained in:
Julien Duponchelle 2017-03-16 10:39:08 +01:00
parent cb6f94bc24
commit 08bafc2dcc
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8
2 changed files with 2 additions and 2 deletions

View File

@ -768,7 +768,7 @@ class DockerVM(BaseNode):
Pull image from docker repository
"""
log.info("Pull %s from docker hub", image)
response = yield from self.manager.http_query("POST", "images/create", params={"fromImage": image})
response = yield from self.manager.http_query("POST", "images/create", params={"fromImage": image}, timeout=None)
# The pull api will stream status via an HTTP JSON stream
content = ""
while True:

View File

@ -819,7 +819,7 @@ def test_pull_image(loop, vm):
with asyncio_patch("gns3server.compute.docker.Docker.http_query", return_value=mock_query) as mock:
images = loop.run_until_complete(asyncio.async(vm.pull_image("ubuntu")))
mock.assert_called_with("POST", "images/create", params={"fromImage": "ubuntu"})
mock.assert_called_with("POST", "images/create", params={"fromImage": "ubuntu"}, timeout=None)
def test_start_capture(vm, tmpdir, manager, free_console_port, loop):