Commit ce44a279 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

suggested changes:

 - exit non 0 code on failure
 - be clearer about additional tests in TODO
 - style: fold a long line in the test


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac277@2522 e5f2f494-b856-4b98-b285-d166d9295462
parent c08819a7
......@@ -3,5 +3,5 @@
. Add check for the content of key/certificate file
(when cmdctl starts or is configured by bindctl).
. Use only one msgq/session to communicate with other modules?
. Add more test cases.
. Add more test cases, especially about the cases where CmdctlException
is raised
......@@ -595,8 +595,10 @@ if __name__ == '__main__':
parser = OptionParser(version = __version__)
set_cmd_options(parser)
(options, args) = parser.parse_args()
result = 1 # in case of failure
try:
run(options.addr, options.port, options.idle_timeout, options.verbose)
result = 0
except isc.cc.SessionError as err:
sys.stderr.write("[b10-cmdctl] Error creating b10-cmdctl, "
"is the command channel daemon running?\n")
......@@ -608,5 +610,4 @@ if __name__ == '__main__':
if httpd:
httpd.shutdown()
sys.exit(result)
......@@ -403,7 +403,8 @@ class TestSecureHTTPServer(unittest.TestCase):
except CmdctlException:
pass
else:
self.assertRaises(CmdctlException, SecureHTTPServer, ('localhost', 53531),
self.assertRaises(CmdctlException, SecureHTTPServer,
('localhost', 53531),
MySecureHTTPRequestHandler, MyCommandControl)
if server_one:
server_one.server_close()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment