aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-09-20 17:33:34 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-25 08:30:20 -0700
commit717999408252e973d3e288fb6aefd1b02e1c3f44 (patch)
tree5f0de0005ca4b3b71c702e651f2d0c4d803e1753 /tests
parent93c0560ee8b3aa69f771cb77161dac58278f92ac (diff)
tg_rfc2544_ixia: use traffic id from JSON to update mac
we were using raw sort index of the interfaces to set the MAC address, but we should be using the traffic id from the static JSON instead. Change-Id: I13284db04abb3eaf8c9826974a9e5aa1c37b3891 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
index 0e303dc3b..0c3520c44 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
@@ -252,7 +252,7 @@ class TestIXIATrafficGen(unittest.TestCase):
mock_traffic_profile = mock.Mock(autospec=TrafficProfile)
mock_traffic_profile.get_traffic_definition.return_value = "64"
mock_traffic_profile.params = self.TRAFFIC_PROFILE
- mock_traffic_profile.ports = [0, 1]
+ mock_traffic_profile.ports = ["xe0", "xe1"]
mock_ssh_instance = mock.Mock(autospec=mock_ssh.SSH)
mock_ssh_instance.execute.return_value = 0, "", ""
@@ -348,6 +348,7 @@ class TestIXIATrafficGen(unittest.TestCase):
with mock.patch('yardstick.benchmark.scenarios.networking.vnf_generic.open',
create=True) as mock_open:
- mock_open.return_value = mock.MagicMock()
- result = sut._traffic_runner(mock_traffic_profile)
- self.assertIsNone(result)
+ with mock.patch('yardstick.network_services.vnf_generic.vnf.tg_rfc2544_ixia.open',
+ create=True) as mock_ixia_open:
+ result = sut._traffic_runner(mock_traffic_profile)
+ self.assertIsNone(result)