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