mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
Merge pull request #2351 from shin-/2322_config_hash_volumes_from
Update service config_dict computation to include volumes_from mode
This commit is contained in:
commit
e5fbf35ce1
@ -502,7 +502,9 @@ class Service(object):
|
||||
'image_id': self.image()['Id'],
|
||||
'links': self.get_link_names(),
|
||||
'net': self.net.id,
|
||||
'volumes_from': self.get_volumes_from_names(),
|
||||
'volumes_from': [
|
||||
(v.source.name, v.mode) for v in self.volumes_from if isinstance(v.source, Service)
|
||||
],
|
||||
}
|
||||
|
||||
def get_dependency_names(self):
|
||||
|
@ -410,7 +410,7 @@ class ServiceTest(unittest.TestCase):
|
||||
'options': {'image': 'example.com/foo'},
|
||||
'links': [('one', 'one')],
|
||||
'net': 'other',
|
||||
'volumes_from': ['two'],
|
||||
'volumes_from': [('two', 'rw')],
|
||||
}
|
||||
self.assertEqual(config_dict, expected)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user