Fixes hyperv neutron agent test, and removes exit

Fixes test for hyperv neutron agent, and removes
sys.exit from hyperv neutron agent

Fixes: bug #1225509
Change-Id: Icf67c6775b6a25a5223ffa7e2d863c2bc0486c2c
This commit is contained in:
Sean McCully 2013-09-14 15:14:33 -05:00
parent 4c8afcced7
commit 2646af8269
2 changed files with 1 additions and 3 deletions

View File

@ -21,7 +21,6 @@
import eventlet
import platform
import re
import sys
import time
from oslo.config import cfg
@ -356,4 +355,3 @@ def main():
# Start everything.
LOG.info(_("Agent initialized successfully, now running... "))
plugin.daemon_loop()
sys.exit(0)

View File

@ -115,7 +115,7 @@ class TestHyperVNeutronAgent(base.BaseTestCase):
def test_main(self):
with mock.patch.object(hyperv_neutron_agent,
'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.object(
hyperv_neutron_agent,