Fix smart recreate when 'image' is changed to something nonexistent
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
e9da790f76
commit
531265bc84
3 changed files with 39 additions and 7 deletions
|
|
@ -215,6 +215,13 @@ class ServiceStateTest(DockerClientTestCase):
|
|||
web = self.create_service('web', command=["top", "-d", "1"])
|
||||
self.assertEqual(('recreate', [container]), web.convergence_plan(smart_recreate=True))
|
||||
|
||||
def test_trigger_recreate_with_nonexistent_image_tag(self):
|
||||
web = self.create_service('web', image="busybox:latest")
|
||||
container = web.create_container()
|
||||
|
||||
web = self.create_service('web', image="nonexistent-image")
|
||||
self.assertEqual(('recreate', [container]), web.convergence_plan(smart_recreate=True))
|
||||
|
||||
def test_trigger_recreate_with_image_change(self):
|
||||
repo = 'composetest_myimage'
|
||||
tag = 'latest'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue