Fix output of 'config' for v1 files
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
8a9ab69a1c
commit
a2ded237e4
3 changed files with 47 additions and 2 deletions
|
|
@ -190,6 +190,31 @@ class CLITestCase(DockerClientTestCase):
|
|||
}
|
||||
assert output == expected
|
||||
|
||||
def test_config_v1(self):
|
||||
self.base_dir = 'tests/fixtures/v1-config'
|
||||
result = self.dispatch(['config'])
|
||||
assert yaml.load(result.stdout) == {
|
||||
'version': '2.0',
|
||||
'services': {
|
||||
'net': {
|
||||
'image': 'busybox',
|
||||
'network_mode': 'bridge',
|
||||
},
|
||||
'volume': {
|
||||
'image': 'busybox',
|
||||
'volumes': ['/data:rw'],
|
||||
'network_mode': 'bridge',
|
||||
},
|
||||
'app': {
|
||||
'image': 'busybox',
|
||||
'volumes_from': ['service:volume:rw'],
|
||||
'network_mode': 'service:net',
|
||||
},
|
||||
},
|
||||
'networks': {},
|
||||
'volumes': {},
|
||||
}
|
||||
|
||||
def test_ps(self):
|
||||
self.project.get_service('simple').create_container()
|
||||
result = self.dispatch(['ps'])
|
||||
|
|
|
|||
10
tests/fixtures/v1-config/docker-compose.yml
vendored
Normal file
10
tests/fixtures/v1-config/docker-compose.yml
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
net:
|
||||
image: busybox
|
||||
volume:
|
||||
image: busybox
|
||||
volumes:
|
||||
- /data
|
||||
app:
|
||||
image: busybox
|
||||
net: "container:net"
|
||||
volumes_from: ["volume"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue