mirror of https://github.com/docker/docker-py.git
tests,integration: ensure container is removed if start fails
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
This commit is contained in:
parent
b5fb6d216f
commit
55b67acb5b
|
@ -950,8 +950,8 @@ class AttachContainerTest(helpers.BaseTestCase):
|
||||||
container = self.client.create_container(BUSYBOX, '/bin/sh',
|
container = self.client.create_container(BUSYBOX, '/bin/sh',
|
||||||
detach=True, stdin_open=True)
|
detach=True, stdin_open=True)
|
||||||
id = container['Id']
|
id = container['Id']
|
||||||
self.client.start(id)
|
|
||||||
self.tmp_containers.append(id)
|
self.tmp_containers.append(id)
|
||||||
|
self.client.start(id)
|
||||||
sock = self.client.attach_socket(container, ws=False)
|
sock = self.client.attach_socket(container, ws=False)
|
||||||
self.assertTrue(sock.fileno() > -1)
|
self.assertTrue(sock.fileno() > -1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue