Support legacy logging options format
Additional test for legacy compose file. Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
21aae13e77
commit
46585fb8e1
3 changed files with 34 additions and 0 deletions
|
|
@ -730,6 +730,20 @@ class CLITestCase(DockerClientTestCase):
|
|||
self.assertEqual(log_config.get('Type'), 'json-file')
|
||||
self.assertEqual(log_config.get('Config')['max-size'], '10m')
|
||||
|
||||
def test_up_logging_legacy(self):
|
||||
self.base_dir = 'tests/fixtures/logging-composefile-legacy'
|
||||
self.dispatch(['up', '-d'])
|
||||
simple = self.project.get_service('simple').containers()[0]
|
||||
log_config = simple.get('HostConfig.LogConfig')
|
||||
self.assertTrue(log_config)
|
||||
self.assertEqual(log_config.get('Type'), 'none')
|
||||
|
||||
another = self.project.get_service('another').containers()[0]
|
||||
log_config = another.get('HostConfig.LogConfig')
|
||||
self.assertTrue(log_config)
|
||||
self.assertEqual(log_config.get('Type'), 'json-file')
|
||||
self.assertEqual(log_config.get('Config')['max-size'], '10m')
|
||||
|
||||
def test_up_logging_with_multiple_files(self):
|
||||
self.base_dir = 'tests/fixtures/logging-composefile'
|
||||
config_paths = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue