aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-08-21 09:33:21 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-08-21 09:33:21 +0000
commiteea4e0e9e2261ef27b5884c51d763b71ff324fb9 (patch)
treefb9f9191cba9328a87c340f402fc54b74ce9b1dc /yardstick/tests
parentaa4e2d2645497f04e9e389aacc0381ff776b0125 (diff)
parent087964a27c111205adb57d74321bee7f703cd844 (diff)
Merge "Make TRex latency statistics optional"
Diffstat (limited to 'yardstick/tests')
-rw-r--r--yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py b/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py
index 2e0331e8e..20f67d71a 100644
--- a/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py
+++ b/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py
@@ -102,10 +102,10 @@ class TestRFC2544Profile(base.BaseUnitTestCase):
mock_create_profile:
rfc2544_profile.execute_traffic(traffic_generator=mock_generator)
mock_create_profile.assert_has_calls([
- mock.call('profile1', rfc2544_profile.rate, mock.ANY),
- mock.call('profile1', rfc2544_profile.rate, mock.ANY),
- mock.call('profile2', rfc2544_profile.rate, mock.ANY),
- mock.call('profile2', rfc2544_profile.rate, mock.ANY)])
+ mock.call('profile1', rfc2544_profile.rate, mock.ANY, False),
+ mock.call('profile1', rfc2544_profile.rate, mock.ANY, False),
+ mock.call('profile2', rfc2544_profile.rate, mock.ANY, False),
+ mock.call('profile2', rfc2544_profile.rate, mock.ANY, False)])
mock_generator.client.add_streams.assert_has_calls([
mock.call(mock.ANY, ports=[10]),
mock.call(mock.ANY, ports=[20]),
@@ -129,13 +129,14 @@ class TestRFC2544Profile(base.BaseUnitTestCase):
mock_create_streams:
mock_create_imix.return_value = 'imix_data'
mock_create_streams.return_value = ['stream1']
- rfc2544_profile._create_profile(profile_data, rate, port_pg_id)
+ rfc2544_profile._create_profile(profile_data, rate, port_pg_id,
+ True)
mock_create_imix.assert_called_once_with('imix_info')
mock_create_vm.assert_called_once_with(
{'outer_l2': {'framesize': 'imix_info'}})
mock_create_streams.assert_called_once_with('imix_data', 100,
- port_pg_id)
+ port_pg_id, True)
mock_stl_profile.assert_called_once_with(['stream1'])
def test__create_imix_data(self):
@@ -208,7 +209,7 @@ class TestRFC2544Profile(base.BaseUnitTestCase):
rfc2544_profile = rfc2544.RFC2544Profile(self.TRAFFIC_PROFILE)
with mock.patch.object(rfc2544_profile, '_create_single_packet'):
output = rfc2544_profile._create_streams(imix_data, rate,
- port_pg_id)
+ port_pg_id, True)
self.assertEqual(['stream1', 'stream2'], output)
mock_latency.assert_has_calls([
mock.call(pg_id=1), mock.call(pg_id=2)])