Fixes test for hyperv neutron agent, and removes
sys.exit from hyperv neutron agent
Fixes: bug #1225509
Change-Id: Icf67c6775b6a25a5223ffa7e2d863c2bc0486c2c
import eventlet
import platform
import re
-import sys
import time
from oslo.config import cfg
# Start everything.
LOG.info(_("Agent initialized successfully, now running... "))
plugin.daemon_loop()
- sys.exit(0)
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,