Move parsing of volumes_from to the last step of config parsing.
Includes creating a new compose.config.types module for all the domain objects. Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
7e21b05f05
commit
e549875e89
9 changed files with 74 additions and 45 deletions
|
|
@ -1,4 +1,5 @@
|
|||
from .. import unittest
|
||||
from compose.config.types import VolumeFromSpec
|
||||
from compose.project import DependencyError
|
||||
from compose.project import sort_service_dicts
|
||||
|
||||
|
|
@ -73,7 +74,7 @@ class SortServiceTest(unittest.TestCase):
|
|||
},
|
||||
{
|
||||
'name': 'parent',
|
||||
'volumes_from': ['child']
|
||||
'volumes_from': [VolumeFromSpec('child', 'rw')]
|
||||
},
|
||||
{
|
||||
'links': ['parent'],
|
||||
|
|
@ -116,7 +117,7 @@ class SortServiceTest(unittest.TestCase):
|
|||
},
|
||||
{
|
||||
'name': 'parent',
|
||||
'volumes_from': ['child']
|
||||
'volumes_from': [VolumeFromSpec('child', 'ro')]
|
||||
},
|
||||
{
|
||||
'name': 'child'
|
||||
|
|
@ -141,7 +142,7 @@ class SortServiceTest(unittest.TestCase):
|
|||
},
|
||||
{
|
||||
'name': 'two',
|
||||
'volumes_from': ['one']
|
||||
'volumes_from': [VolumeFromSpec('one', 'rw')]
|
||||
},
|
||||
{
|
||||
'name': 'one'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue