summaryrefslogtreecommitdiffstats
path: root/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py
diff options
context:
space:
mode:
authorMartin Banszel <martinx.banszel@intel.com>2017-07-19 19:35:02 +0000
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-05 17:48:02 -0700
commitd3ee35dc0015e073b7138f3b02508b40fc6288b1 (patch)
treed5350f427a7ba6dcea8d36b00ae217d0074f0511 /tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py
parent79e811f096f8640189fc75862535f1f0cc4773c5 (diff)
Add fixes for heat deployed UDP_Replay and TRex
- Added a PROTOCOL_MAP to map the protocol names to codes -- the scapy requires the code, it fails if the proto is set e.g. to 'udp' - ip addresses must be str, not unicode -- explicit conversion to str added - removed unittest for setup_vnf_environment in test_tg_trex.py as it is the same function as already tested in test_sample_vnf.py - traffic_profile refactored -- code repetition decreased, unittest adapted Known issues: - there is a an attempt to stop already stopped trex. It fires an exception that stop command is issued on the disconnected client. Change-Id: I87e9029630f48b30e8f5b4f9d88ab3b25fd65f03 Signed-off-by: Martin Banszel <martinx.banszel@intel.com>
Diffstat (limited to 'tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py')
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py
index ad8c6494e..6f2a9445f 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py
@@ -21,9 +21,9 @@ import unittest
import mock
from tests.unit import STL_MOCKS
+SSH_HELPER = 'yardstick.network_services.vnf_generic.vnf.sample_vnf.VnfSshHelper'
-SSH_HELPER = "yardstick.ssh.SSH"
STLClient = mock.MagicMock()
stl_patch = mock.patch.dict("sys.modules", STL_MOCKS)
@@ -252,6 +252,8 @@ class TestTrexTrafficGenRFC(unittest.TestCase):
trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
trex_traffic_gen._start_server = mock.Mock(return_value=0)
trex_traffic_gen.resource_helper = mock.MagicMock()
+ trex_traffic_gen.setup_helper.setup_vnf_environment = mock.MagicMock()
+
scenario_cfg = {
"tc": "tc_baremetal_rfc2544_ipv4_1flow_64B",
"topology": 'nsb_test_case.yaml',
@@ -286,6 +288,7 @@ class TestTrexTrafficGenRFC(unittest.TestCase):
trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0)
trex_traffic_gen.resource_helper = mock.MagicMock()
+ trex_traffic_gen.setup_helper.setup_vnf_environment = mock.MagicMock()
scenario_cfg = {
"tc": "tc_baremetal_rfc2544_ipv4_1flow_64B",
"nodes": [