diff options
Diffstat (limited to 'tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py')
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py | 18 |
1 files changed, 10 insertions, 8 deletions
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 a12abb625..73e1c723f 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 @@ -80,7 +80,7 @@ class TestProxTrafficGen(unittest.TestCase): 'type': 'PCI-PASSTHROUGH', 'vld_id': '', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'driver': "i40e", 'dst_ip': '152.16.100.20', @@ -99,7 +99,7 @@ class TestProxTrafficGen(unittest.TestCase): 'vld_id': '', 'driver': "i40e", 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_iface_name': 'xe1', @@ -180,7 +180,7 @@ class TestProxTrafficGen(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': ProxTrafficGen.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -214,7 +214,7 @@ class TestProxTrafficGen(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': ProxTrafficGen.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -245,7 +245,7 @@ class TestProxTrafficGen(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': ProxTrafficGen.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -257,7 +257,7 @@ class TestProxTrafficGen(unittest.TestCase): }, 'xe1': { 'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': ProxTrafficGen.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', @@ -349,8 +349,10 @@ class TestProxTrafficGen(unittest.TestCase): vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] prox_traffic_gen = ProxTrafficGen(NAME, vnfd) - prox_traffic_gen.ssh_helper = mock.MagicMock( + ssh_helper = mock.MagicMock( **{"execute.return_value": (0, "", ""), "bin_path": ""}) + prox_traffic_gen.ssh_helper = ssh_helper + prox_traffic_gen.setup_helper.dpdk_bind_helper.ssh_helper = ssh_helper prox_traffic_gen.setup_helper._setup_resources = mock.MagicMock() prox_traffic_gen.setup_hugepages = mock.MagicMock() prox_traffic_gen.generate_prox_config_file = mock.MagicMock() @@ -384,7 +386,7 @@ class TestProxTrafficGen(unittest.TestCase): mock_traffic_profile = mock.Mock(autospec=TrafficProfile) mock_traffic_profile.get_traffic_definition.return_value = "64" - mock_traffic_profile.execute.return_value = "64" + mock_traffic_profile.execute_traffic.return_value = "64" mock_traffic_profile.params = self.TRAFFIC_PROFILE vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] |