]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Registers root_helper option for test_iptables_firewall
authorZhongyue Luo <zhongyue.nah@intel.com>
Tue, 5 Mar 2013 09:44:23 +0000 (17:44 +0800)
committerZhongyue Luo <zhongyue.nah@intel.com>
Thu, 14 Mar 2013 01:51:11 +0000 (09:51 +0800)
Fixes bug #1146478

Change-Id: I908a142d9463719e7b3c94aa1d699d329c9259de

quantum/tests/unit/test_iptables_firewall.py

index cbf61c5433b3f877f69b70a8b3ee401fafdf0acb..5f2ee5a4ae9306a135875b2e5a7193f797608b6b 100644 (file)
@@ -17,7 +17,9 @@
 
 import mock
 from mock import call
+from oslo.config import cfg
 
+from quantum.agent.common import config as a_cfg
 from quantum.agent.linux.iptables_firewall import IptablesFirewallDriver
 from quantum.tests.unit import test_api_v2
 from quantum.tests import base
@@ -32,6 +34,7 @@ FAKE_IP = {'IPv4': '10.0.0.1',
 class IptablesFirewallTestCase(base.BaseTestCase):
     def setUp(self):
         super(IptablesFirewallTestCase, self).setUp()
+        cfg.CONF.register_opts(a_cfg.ROOT_HELPER_OPTS, 'AGENT')
         self.utils_exec_p = mock.patch(
             'quantum.agent.linux.utils.execute')
         self.utils_exec = self.utils_exec_p.start()