summaryrefslogtreecommitdiffstats
path: root/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-09-20 02:53:54 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-20 02:53:54 +0000
commit9a8de3b337c45da22706cac29bc31cda9cf63fa9 (patch)
tree96218912a8282d83457c80ed2d0b9b9f3cb31038 /tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py
parentf410ec7c420632a4596c14e05f8a9650b5d84803 (diff)
parent94612c27db940251eb40018a48be73fc7507d1c4 (diff)
Merge "prox: pass prox_config_dict between Processes using queue"
Diffstat (limited to 'tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py')
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py
index d1f7f05d8..f8b592d8c 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py
@@ -86,6 +86,7 @@ class TestProxApproxVnf(unittest.TestCase):
'local_ip': '152.16.100.19',
'type': 'PCI-PASSTHROUGH',
'vld_id': '',
+ 'ifname': 'xe1',
'netmask': '255.255.255.0',
'dpdk_port_num': 0,
'bandwidth': '10 Gbps',
@@ -104,6 +105,7 @@ class TestProxApproxVnf(unittest.TestCase):
'local_ip': '152.16.40.19',
'type': 'PCI-PASSTHROUGH',
'vld_id': '',
+ 'ifname': 'xe3',
'driver': "i40e",
'netmask': '255.255.255.0',
'dpdk_port_num': 1,
@@ -372,8 +374,10 @@ class TestProxApproxVnf(unittest.TestCase):
file_path = os.path.join(curr_path, filename)
return file_path
+ @mock.patch('yardstick.benchmark.scenarios.networking.vnf_generic.open', create=True)
+ @mock.patch('yardstick.network_services.vnf_generic.vnf.iniparser.open', create=True)
@mock.patch(SSH_HELPER)
- def test_run_prox(self, ssh, mock_time):
+ def test_run_prox(self, ssh, *_):
mock_ssh(ssh)
prox_approx_vnf = ProxApproxVnf(NAME, self.VNFD0)
@@ -382,7 +386,7 @@ class TestProxApproxVnf(unittest.TestCase):
prox_approx_vnf.setup_helper.remote_path = 'configs/file56.cfg'
expected = "sudo bash -c 'cd /tool_path12; " \
- "/tool_path12/tool_file34 -o cli -t -f configs/file56.cfg '"
+ "/tool_path12/tool_file34 -o cli -t -f /tmp/l3-swap-2.cfg '"
prox_approx_vnf._run()
result = prox_approx_vnf.ssh_helper.run.call_args[0][0]
@@ -395,7 +399,7 @@ class TestProxApproxVnf(unittest.TestCase):
prox_approx_vnf.setup_helper = mock.MagicMock()
# we can't mock super
prox_approx_vnf.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG)
- prox_approx_vnf.setup_helper.build_config.assert_called_once
+ prox_approx_vnf.setup_helper.build_config.assert_called_once()
@mock.patch(SSH_HELPER)
def test_wait_for_instantiate_panic(self, ssh, mock_time):