Coverage for src/bin/cfgmgr/plugins/tests/logging_test : 97%
        
        
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
| 
 # Copyright (C) 2011 Internet Systems Consortium. # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM # DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL # INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
 # Make sure we can load the module, put it into path 
 
 """ Checks the entry point returns the correct values. """ # It returns the checking function # The plugin stores it's spec 
 b10logging.check({'loggers': [{'name': '*', 'severity': 'DEBUG', 'debuglevel': 50, 'output_options': [{'destination': 'file', 'output': '/some/file' }] }, {'name': 'b10-resolver', 'severity': 'WARN', 'additive': True, 'output_options': [{'destination': 'console', 'output': 'stderr', 'flush': True }] }, {'name': 'b10-resolver.resolver', 'severity': 'ERROR', 'output_options': [] }, {'name': '*.cache', 'severity': 'INFO' } ]})) "used instead of the full first-level name, e.g. "\ "'*' or '*.subsystem'" b10logging.check({'loggers': [{'name': name, 'severity': 'DEBUG'}, ]})) 
 
 b10logging.check({'loggers': [{'name': '*', 'severity': 'BADVAL'}]})) 
 b10logging.check({'loggers': [{'name': '*', 'severity': 'INFO', 'output_options': [ { 'destination': 'baddest' } ]}]})) 
 b10logging.check({'loggers': [{'name': '*', 'severity': 'INFO', 'output_options': [ { 'destination': 'console', 'output': 'bad_output' } ]}]})) 
 b10logging.check({'loggers': [{'name': '*', 'severity': 'INFO', 'output_options': [ { 'destination': 'file' } ]}]})) 
 b10logging.check({'loggers': [{'name': '*', 'severity': 'INFO', 'output_options': [ { 'destination': 'syslog' } ]}]})) 
 b10logging.check({'loggers': [{'name': 123, 'severity': 'INFO'}]})) b10logging.check({'loggers': [{'name': 'bind10', 'severity': 123}]})) 
  |