]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fixes hyperv neutron agent test, and removes exit
authorSean McCully <sean_mccully@yahoo.com>
Sat, 14 Sep 2013 20:14:33 +0000 (15:14 -0500)
committerSean McCully <sean_mccully@yahoo.com>
Mon, 16 Sep 2013 20:47:33 +0000 (15:47 -0500)
Fixes test for hyperv neutron agent, and removes
sys.exit from hyperv neutron agent

Fixes: bug #1225509
Change-Id: Icf67c6775b6a25a5223ffa7e2d863c2bc0486c2c

neutron/plugins/hyperv/agent/hyperv_neutron_agent.py
neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py

index 76dc2db515311c8e2a636ebdc7d695389af77525..40c347a8ac8c6aba20bed003509bef51c8051fd4 100644 (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)
index faf1fc6fcf6f597c5b1e7533cd013882fa77a96a..f9e17d41bb687b78f9c3da4d75469b6d07ebac8b 100644 (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,