Merge pull request #3475 from shin-/3429-networks-config-serialize

Output valid config in config command
This commit is contained in:
Aanand Prasad 2016-06-07 18:01:39 +02:00
commit e502417df2
2 changed files with 19 additions and 1 deletions

View file

@ -224,6 +224,20 @@ class CLITestCase(DockerClientTestCase):
'volumes': {},
}
def test_config_external_network(self):
self.base_dir = 'tests/fixtures/networks'
result = self.dispatch(['-f', 'external-networks.yml', 'config'])
json_result = yaml.load(result.stdout)
assert 'networks' in json_result
assert json_result['networks'] == {
'networks_foo': {
'external': True # {'name': 'networks_foo'}
},
'bar': {
'external': {'name': 'networks_bar'}
}
}
def test_config_v1(self):
self.base_dir = 'tests/fixtures/v1-config'
result = self.dispatch(['config'])