aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/network_services/vnf_generic
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/network_services/vnf_generic')
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py13
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py1
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py12
3 files changed, 11 insertions, 15 deletions
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
index d0c4b6f42..77c92e0fb 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
@@ -1136,11 +1136,6 @@ class TestClientResourceHelper(unittest.TestCase):
dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
client_resource_helper.client = mock.MagicMock()
- client_resource_helper._vpci_ascending = [
- '0000:05:00.0',
- '0000:05:00.1',
- '0000:05:00.2',
- ]
client_resource_helper.client.get_stats.return_value = {
0: {
'rx_pps': 5.5,
@@ -1186,10 +1181,6 @@ class TestClientResourceHelper(unittest.TestCase):
dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
client_resource_helper.client = mock.MagicMock()
- client_resource_helper._vpci_ascending = [
- '0000:05:00.0',
- '0000:05:00.1',
- ]
client_resource_helper.client.get_stats.return_value = {
'key_name': 'key_value',
0: {
@@ -1238,10 +1229,6 @@ class TestClientResourceHelper(unittest.TestCase):
dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper)
client_resource_helper = ClientResourceHelper(dpdk_setup_helper)
client_resource_helper.client = mock.MagicMock()
- client_resource_helper._vpci_ascending = [
- '0000:05:00.0',
- '0000:05:00.1',
- ]
client_resource_helper.client.get_stats.return_value = {
0: {
'rx_pps': 5.5,
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 eb569cfe6..bdda149c5 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
@@ -395,7 +395,6 @@ class TestProxTrafficGen(unittest.TestCase):
sut.ssh_helper = mock.Mock()
sut.ssh_helper.run = mock.Mock()
sut.setup_helper.prox_config_dict = {}
- sut._vpci_ascending = ["0000:05:00.0", "0000:05:00.1"]
sut._connect_client = mock.Mock(autospec=STLClient)
sut._connect_client.get_stats = mock.Mock(return_value="0")
sut._traffic_runner(mock_traffic_profile)
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
index eb9f0525b..d08c62e0b 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
@@ -356,6 +356,17 @@ class TestTrexTrafficGen(unittest.TestCase):
trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
trex_traffic_gen.ssh_helper = mock.MagicMock()
trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock()
+ trex_traffic_gen.scenario_helper.scenario_cfg = {}
+ self.assertIsNone(trex_traffic_gen._start_server())
+
+ @mock.patch(SSH_HELPER)
+ def test__start_server_multiple_queues(self, ssh):
+ mock_ssh(ssh)
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ trex_traffic_gen.ssh_helper = mock.MagicMock()
+ trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock()
+ trex_traffic_gen.scenario_helper.scenario_cfg = {"options": {NAME: {"queues_per_port": 2}}}
self.assertIsNone(trex_traffic_gen._start_server())
@mock.patch(SSH_HELPER)
@@ -371,7 +382,6 @@ class TestTrexTrafficGen(unittest.TestCase):
self.sut = TrexTrafficGen(NAME, vnfd)
self.sut.ssh_helper = mock.Mock()
self.sut.ssh_helper.run = mock.Mock()
- self.sut._vpci_ascending = ["0000:05:00.0", "0000:05:00.1"]
self.sut._connect_client = mock.Mock(autospec=STLClient)
self.sut._connect_client.get_stats = mock.Mock(return_value="0")
self.sut.resource_helper.RUN_DURATION = 0