Merge "Fix TestNecAgentMain not to call sys.exit()"
This commit is contained in:
commit
248375ed0b
@ -23,7 +23,6 @@
|
||||
# @author: Akihiro MOTOKI
|
||||
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
|
||||
import eventlet
|
||||
@ -242,8 +241,6 @@ def main():
|
||||
# Start everything.
|
||||
agent.daemon_loop()
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
@ -290,12 +290,12 @@ class TestNecAgentMain(base.BaseTestCase):
|
||||
with contextlib.nested(
|
||||
mock.patch.object(nec_quantum_agent, 'NECQuantumAgent'),
|
||||
mock.patch('eventlet.monkey_patch'),
|
||||
mock.patch('quantum.common.config'),
|
||||
mock.patch.object(nec_quantum_agent, 'logging_config'),
|
||||
mock.patch.object(nec_quantum_agent, 'config')
|
||||
) as (agent, eventlet, logging_config, cfg):
|
||||
cfg.CONF.ovs.integration_bridge = 'br-int-x'
|
||||
cfg.CONF.AGENT.root_helper = 'dummy-helper'
|
||||
cfg.CONF.AGENT.polling_interval = 10
|
||||
cfg.OVS.integration_bridge = 'br-int-x'
|
||||
cfg.AGENT.root_helper = 'dummy-helper'
|
||||
cfg.AGENT.polling_interval = 10
|
||||
|
||||
nec_quantum_agent.main()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user