Merge pull request #2335 from dnephin/volumes_refactoring

Some small refactoring around volumes
This commit is contained in:
Joffrey F 2015-11-09 14:05:52 -08:00
commit 774d852f93
4 changed files with 26 additions and 32 deletions

View file

@ -577,7 +577,7 @@ class VolumeConfigTest(unittest.TestCase):
def test_volume_path_with_non_ascii_directory(self):
volume = u'/Füü/data:/data'
container_path = config.resolve_volume_path(volume, ".", "test")
container_path = config.resolve_volume_path(".", volume, "test")
self.assertEqual(container_path, volume)

View file

@ -593,11 +593,11 @@ class ServiceVolumesTest(unittest.TestCase):
self.assertEqual(binding, ('/inside', '/outside:/inside:rw'))
def test_get_container_data_volumes(self):
options = [
options = [parse_volume_spec(v) for v in [
'/host/volume:/host/volume:ro',
'/new/volume',
'/existing/volume',
]
]]
self.mock_client.inspect_image.return_value = {
'ContainerConfig': {