aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJeffrey Zhang <zhang.lei.fly@gmail.com>2017-07-28 10:03:03 +0800
committerJeffrey Zhang <zhang.lei.fly@gmail.com>2017-07-28 17:26:27 +0800
commit7f2ade5b5acd8e19a7eecc8d83dd787bda5c9398 (patch)
tree907142b41b31bebc2e28e04185f40970d32983eb /tests
parent71133abce7ac90fb0af446603d809dfaa6461a4d (diff)
downloadkolla-ansible-7f2ade5b5acd8e19a7eecc8d83dd787bda5c9398.tar.gz
kolla-ansible-7f2ade5b5acd8e19a7eecc8d83dd787bda5c9398.zip
Stop and start container rather than use restart directly
Docker has an issue[0] when restart container. But stop then start works. [0] https://github.com/moby/moby/issues/29704 Change-Id: If0a9c0c257cd72209be8e138a1f0b8871500e089 Closes-Bug: #1707097
Diffstat (limited to 'tests')
-rw-r--r--tests/test_kolla_docker.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_kolla_docker.py b/tests/test_kolla_docker.py
index f1fa89fa3..7fb4015a0 100644
--- a/tests/test_kolla_docker.py
+++ b/tests/test_kolla_docker.py
@@ -298,7 +298,8 @@ class TestContainer(base.BaseTestCase):
self.assertTrue(self.dw.changed)
self.dw.dc.containers.assert_called_once_with(all=True)
self.dw.dc.inspect_container.assert_called_once_with('my_container')
- self.dw.dc.restart.assert_called_once_with('my_container', timeout=10)
+ self.dw.dc.stop.assert_called_once_with('my_container', timeout=10)
+ self.dw.dc.start.assert_called_once_with('my_container')
def test_restart_container_not_exists(self):
self.dw = get_DockerWorker({'name': 'fake-container',