#NEWLINE# @ v2_only ( ) #NEWLINE# def test_project_up_logging_with_multiple_files( self ) : #NEWLINE# #INDENT# base_file = config . ConfigFile ( 'base.yml' , { #NEWLINE# #INDENT# 'version' : V2_0 , #NEWLINE# 'services' : { #NEWLINE# #INDENT# 'simple' : { #NEWLINE# #INDENT# 'image' : 'busybox:latest' , #NEWLINE# 'command' : 'top' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'another' : { #NEWLINE# #INDENT# 'image' : 'busybox:latest' , #NEWLINE# 'command' : 'top' , #NEWLINE# 'logging' : { #NEWLINE# #INDENT# 'driver' : 'json-file' , #NEWLINE# 'options' : { #NEWLINE# #INDENT# 'max-size' : '10m' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# override_file = config . ConfigFile ( 'override.yml' , { #NEWLINE# #INDENT# 'version' : V2_0 , #NEWLINE# 'services' : { #NEWLINE# #INDENT# 'another' : { #NEWLINE# #INDENT# 'logging' : { #NEWLINE# #INDENT# 'driver' : 'none' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# details = config . ConfigDetails ( '.' , [ base_file , override_file ] ) #NEWLINE# tmpdir = py . test . ensuretemp ( 'logging_test' ) #NEWLINE# self . addCleanup ( tmpdir . remove ) #NEWLINE# with tmpdir . as_cwd ( ) : #NEWLINE# #INDENT# config_data = config . load ( details ) #NEWLINE# #UNINDENT# project = Project . from_config ( name = 'composetest' , config_data = self , client = self . client ) #NEWLINE# project . up ( ) #NEWLINE# containers = project . containers ( ) #NEWLINE# self . assertEqual ( len ( containers ) , 2 ) #NEWLINE# another = project . get_service ( 'another' ) . containers ( ) [ 0 ] #NEWLINE# log_config = another . get ( 'HostConfig.LogConfig' ) #NEWLINE# self . assertTrue ( log_config ) #NEWLINE# self . assertEqual ( log_config . get ( 'Type' ) , 'none' )