password = options.fetch(:password, 'admin')
log_max_size = options.fetch(:log_max_size, '10GB')
log_max_rollover = options.fetch(:log_max_rollover, 2)
+ log_pattern = options.fetch(:log_pattern, '%d{ISO8601} | %-5p | %-16t | %-60c{6} | %m%n')
log_rollover_fileindex = options.fetch(:log_rollover_fileindex, 'min')
snat_mechanism = options.fetch(:snat_mechanism, 'controller')
enable_tls = options.fetch(:enable_tls, false)
password => #{password},
log_max_size => '#{log_max_size}',
log_max_rollover => #{log_max_rollover},
+ log_pattern => '#{log_pattern}',
log_rollover_fileindex => #{log_rollover_fileindex},
snat_mechanism => #{snat_mechanism},
enable_tls => #{enable_tls},
# Should contain log level config file with correct file size and rollover values
log_max_size = options.fetch(:log_max_size, '10GB')
log_max_rollover = options.fetch(:log_max_rollover, 2)
+ log_pattern = options.fetch(:log_pattern, '%d{ISO8601} | %-5p | %-16t | %-60c{6} | %m%n')
log_rollover_fileindex = options.fetch(:log_rollover_fileindex, 'min')
log_mechanism = options.fetch(:log_mechanism, 'file')
its(:content) { should match /^log4j2.appender.rolling.strategy.fileIndex = #{log_rollover_fileindex}/ }
end
end
+ describe file('/opt/opendaylight/etc/org.ops4j.pax.logging.cfg') do
+ its(:content) { should match /^log4j2.pattern = #{log_pattern}/ }
+ end
end
# Shared function for validations related to the Karaf config file