Coverage for src/bin/cfgmgr/plugins/tests/tsig_keys_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 
 """ Checks the spec is looking sane (doesn't do really deep check here). """ # In python, we don't generally check the type of something, because # of the duck typing. # But this is unittest, so we check it does what we intend and # supplying that's behaving the same but is different is not our # intention # Correct name # There are no commands, nobody would handle them anyway # There's some nonempty configuration 
 """ Test that missing keys doesn't kill us. There are just no keys there. """ 
 """Check we accept valid config with empty set of tsig keys.""" 
 """ Check we accept some valid keys (we don't check all the algorithms, that's the job of isc.dns.TSIGKey). """ ['testkey:QklORCAxMCBpcyBjb29sCg==', 'test.key:QklORCAxMCBpcyBjb29sCg==:hmac-sha1']})) 
 """ Test we reject when we have multiple keys with the same name. """ tsig_keys.check({'keys': ['test.key:QklORCAxMCBpcyBjb29sCg==', 'test.key:b3RoZXIK']})) 
 """ Test we reject invalid key. """ tsig_keys.check({'keys': ['invalid.key']})) "TSIG: Unexpected end of input in BASE decoder", tsig_keys.check({'keys': ['invalid.key:123']})) 
 """ Test we fail on bad format. We don't really care much how here, though, as this should not get in trough config manager anyway. """ 
  |