diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2017-09-20 15:17:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-20 15:17:41 +0000 |
commit | d886bf33fc0880abe2b3d1203cf2eba486f23b43 (patch) | |
tree | cafcc9b73e4c189ab34050269f79d1f110c3a112 /tests | |
parent | 05f2d66b34290fd2538f5c50e841db0b86616e77 (diff) | |
parent | 02b047ef1496ea23fdb1a8ce15cf4b98f5e5a3a1 (diff) |
Merge "prox: fix TG KPIs"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py | 2 | ||||
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py | 15 |
2 files changed, 8 insertions, 9 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 f8b592d8c..c88b1528c 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 @@ -342,7 +342,7 @@ class TestProxApproxVnf(unittest.TestCase): resource_helper = mock.MagicMock() resource_helper.execute.return_value = list(range(12)) - resource_helper.collect_kpi.return_value = {'core': {'result': 234}} + resource_helper.collect_collectd_kpi.return_value = {'core': {'result': 234}} prox_approx_vnf = ProxApproxVnf(NAME, self.VNFD0) prox_approx_vnf.resource_helper = resource_helper diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py index 4e82c0d5e..eb569cfe6 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py @@ -20,7 +20,6 @@ import mock from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh from tests.unit import STL_MOCKS -from yardstick.network_services.nfvi.resource import ResourceProfile SSH_HELPER = 'yardstick.network_services.vnf_generic.vnf.sample_vnf.VnfSshHelper' NAME = 'vnf__1' @@ -334,7 +333,7 @@ class TestProxTrafficGen(unittest.TestCase): prox_traffic_gen._vnf_wrapper.resource_helper.resource = mock.MagicMock( **{"check_if_sa_running.return_value": [False]}) prox_traffic_gen._vnf_wrapper.vnf_execute = mock.Mock(return_value="") - self.assertEqual({"core": {}}, prox_traffic_gen.collect_kpi()) + self.assertEqual({}, prox_traffic_gen.collect_kpi()) @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.CpuSysCores') @mock.patch('yardstick.network_services.vnf_generic.vnf.prox_helpers.find_relative_file') @@ -372,12 +371,12 @@ class TestProxTrafficGen(unittest.TestCase): 'task_path': '', 'options': {'tg__1': {'prox_args': {'-e': '', '-t': ''}, - 'prox_config': 'configs/l3-gen-2.cfg', - 'prox_path': '/root/dppd-PROX-v035/build/prox'}, - 'vnf__1': {'prox_args': {'-t': ''}, - 'prox_config': 'configs/l3-swap-2.cfg', - 'prox_path': '/root/dppd-PROX-v035/build/prox'} - } + 'prox_config': 'configs/l3-gen-2.cfg', + 'prox_path': '/root/dppd-PROX-v035/build/prox'}, + 'vnf__1': {'prox_args': {'-t': ''}, + 'prox_config': 'configs/l3-swap-2.cfg', + 'prox_path': '/root/dppd-PROX-v035/build/prox'} + } } prox_traffic_gen.instantiate(scenario_cfg, {}) |