diff options
author | Chornyi, TarasX <tarasx.chornyi@intel.com> | 2018-04-30 17:17:26 +0300 |
---|---|---|
committer | Taras Chornyi <tarasx.chornyi@intel.com> | 2018-05-16 08:50:49 +0000 |
commit | 1c8bfeb11a620c63ffd9fcd7f8735ded4521e077 (patch) | |
tree | 607bb5e467f7a835a8b9e8047a973f970e9ede6f /tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py | |
parent | bd44ab9134606c3a73045128d8a4c4d688f465f5 (diff) |
Add --hwlb options as a command line argument for SampleVNF
To enable HWLB queues in samplevnf on supported hardware
(e.g Intel Fortville) --hwlb option needs to be passed
as a VNF command line argument.
JIRA: YARDSTICK-1159
Change-Id: I6e5c098dc71a711252b545c7622ee52085fa81f0
Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com>
Diffstat (limited to 'tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py')
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py index 8c45d973e..9857e95b6 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py @@ -18,7 +18,7 @@ import os import time import mock -import six.moves.configparser as configparser +from six.moves import configparser import unittest from tests.unit import STL_MOCKS @@ -663,7 +663,14 @@ class TestVpeApproxVnf(unittest.TestCase): vpe_approx_vnf.ssh_helper.bin_path = mock.Mock() vpe_approx_vnf.ssh_helper.upload_config_file = mock.MagicMock() self.assertIsNone(vpe_approx_vnf._build_vnf_ports()) - self.assertIsNotNone(vpe_approx_vnf.build_config()) + + vpe_approx_vnf.ssh_helper.provision_tool = mock.Mock(return_value='tool_path') + vpe_approx_vnf.ssh_helper.all_ports = mock.Mock() + vpe_approx_vnf.vnfd_helper.port_nums = mock.Mock(return_value=[0, 1]) + vpe_approx_vnf.scenario_helper.vnf_cfg = {'lb_config': 'HW'} + + expected = 'sudo tool_path -p 0x3 -f /tmp/vpe_config -s /tmp/vpe_script --hwlb 3' + self.assertEqual(vpe_approx_vnf.build_config(), expected) @mock.patch(SSH_HELPER) def test_wait_for_instantiate(self, ssh): |