Support volumes in config with an unspecified host path

This commit is contained in:
Aanand Prasad 2014-01-15 12:43:40 +00:00
commit 3669236aa1
2 changed files with 21 additions and 3 deletions

View file

@ -102,6 +102,12 @@ class ServiceTest(DockerClientTestCase):
container = db.create_container(one_off=True)
self.assertEqual(container.name, 'figtest_db_run_1')
def test_create_container_with_unspecified_volume(self):
service = self.create_service('db', volumes=['/var/db'])
container = service.create_container()
service.start_container(container)
self.assertIn('/var/db', container.inspect()['Volumes'])
def test_recreate_containers(self):
service = self.create_service('db', environment={'FOO': '1'})
container = service.create_container()