mirror of https://github.com/docker/compose.git
Merge pull request #4562 from shin-/lindt-bugfix/unnamed_volumes_do_not_support_mode_suffix
Do not add mode to anonymous volumes in config output
This commit is contained in:
commit
4dca6adeb1
|
@ -203,7 +203,8 @@ class VolumeSpec(namedtuple('_VolumeSpec', 'external internal mode')):
|
|||
|
||||
def repr(self):
|
||||
external = self.external + ':' if self.external else ''
|
||||
return '{ext}{v.internal}:{v.mode}'.format(ext=external, v=self)
|
||||
mode = ':' + self.mode if self.external else ''
|
||||
return '{ext}{v.internal}{mode}'.format(mode=mode, ext=external, v=self)
|
||||
|
||||
@property
|
||||
def is_named_volume(self):
|
||||
|
|
|
@ -222,7 +222,7 @@ class CLITestCase(DockerClientTestCase):
|
|||
'other': {
|
||||
'image': 'busybox:latest',
|
||||
'command': 'top',
|
||||
'volumes': ['/data:rw'],
|
||||
'volumes': ['/data'],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ class CLITestCase(DockerClientTestCase):
|
|||
},
|
||||
'volume': {
|
||||
'image': 'busybox',
|
||||
'volumes': ['/data:rw'],
|
||||
'volumes': ['/data'],
|
||||
'network_mode': 'bridge',
|
||||
},
|
||||
'app': {
|
||||
|
|
Loading…
Reference in New Issue