Don't preserve host volumes on container recreate.

Fixes a regression after the API changed to use Mounts.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2015-11-04 17:09:40 -05:00 committed by Joffrey F
commit 97fe2ee40c
3 changed files with 27 additions and 9 deletions

View file

@ -234,6 +234,7 @@ class ServiceTest(unittest.TestCase):
prev_container = mock.Mock(
id='ababab',
image_config={'ContainerConfig': {}})
prev_container.get.return_value = None
opts = service._get_container_create_options(
{},
@ -575,6 +576,10 @@ class NetTestCase(unittest.TestCase):
self.assertEqual(net.service_name, service_name)
def build_mount(destination, source, mode='rw'):
return {'Source': source, 'Destination': destination, 'Mode': mode}
class ServiceVolumesTest(unittest.TestCase):
def setUp(self):