Add debug flag in the config
1) Let server read the debug flag from config 2) Write the test case, use assertEqual for explicity 3) Keep the value to True for current usage Change-Id: I83e4ae92e43b8be92cf92ff257f317ed1bf9491e Closes-Bug: #1531073
This commit is contained in:
parent
bdcb749e4a
commit
6d5ebc088e
@ -46,7 +46,9 @@ core_opts = [
|
||||
help=_('The default neutron local address-scope name')),
|
||||
cfg.StrOpt('global_default_address_space',
|
||||
default='global_scope',
|
||||
help=_('The default neutron global address-scope name.'))
|
||||
help=_('The default neutron global address-scope name.')),
|
||||
cfg.BoolOpt('debug', default=True,
|
||||
help=_('Enable or Disable debug mode for kuryr server.'))
|
||||
]
|
||||
neutron_opts = [
|
||||
cfg.StrOpt('neutron_uri',
|
||||
|
@ -21,5 +21,5 @@ def start():
|
||||
from kuryr import app
|
||||
from kuryr import controllers
|
||||
controllers.check_for_neutron_ext_support()
|
||||
app.debug = True
|
||||
app.debug = config.CONF.debug
|
||||
app.run("0.0.0.0", port)
|
||||
|
@ -32,6 +32,8 @@ class ConfigurationTest(base.TestKuryrBase):
|
||||
self.assertEqual('http://127.0.0.1:2377',
|
||||
config.CONF.kuryr_uri)
|
||||
|
||||
self.assertEqual(True, config.CONF.debug)
|
||||
|
||||
self.assertEqual('http://127.0.0.1:9696',
|
||||
config.CONF.neutron_client.neutron_uri)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user