Merge "Fixes hyperv neutron agent test, and removes exit"
This commit is contained in:
commit
117630c08a
@ -21,7 +21,6 @@
|
|||||||
import eventlet
|
import eventlet
|
||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
@ -356,4 +355,3 @@ def main():
|
|||||||
# Start everything.
|
# Start everything.
|
||||||
LOG.info(_("Agent initialized successfully, now running... "))
|
LOG.info(_("Agent initialized successfully, now running... "))
|
||||||
plugin.daemon_loop()
|
plugin.daemon_loop()
|
||||||
sys.exit(0)
|
|
||||||
|
@ -115,7 +115,7 @@ class TestHyperVNeutronAgent(base.BaseTestCase):
|
|||||||
def test_main(self):
|
def test_main(self):
|
||||||
with mock.patch.object(hyperv_neutron_agent,
|
with mock.patch.object(hyperv_neutron_agent,
|
||||||
'HyperVNeutronAgent') as plugin:
|
'HyperVNeutronAgent') as plugin:
|
||||||
with mock.patch.object(hyperv_neutron_agent, 'cfg') as cfg:
|
with mock.patch.object(hyperv_neutron_agent.cfg, 'CONF') as cfg:
|
||||||
with mock.patch('eventlet.monkey_patch') as eventlet:
|
with mock.patch('eventlet.monkey_patch') as eventlet:
|
||||||
with mock.patch.object(
|
with mock.patch.object(
|
||||||
hyperv_neutron_agent,
|
hyperv_neutron_agent,
|
||||||
|
Loading…
Reference in New Issue
Block a user