aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/scenarios/networking
diff options
context:
space:
mode:
authorMytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>2018-08-16 08:40:04 +0100
committerMytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>2018-08-16 10:26:02 +0100
commiteed1b9cca960e7c7a3980d0a94b3589cf6b81eab (patch)
tree40bccad2af6878f5e7dc3c557226361afab5d433 /yardstick/tests/unit/benchmark/scenarios/networking
parentf32d9e5e452429905c8099db9b5d4a0fa14dff13 (diff)
Fix setting `flow` configuration in TC yaml
The `flow` configuration is not applied to the traffic profile if `seed` or `count` option is missing in the TC definition. - Fix `seed` backward compatibility. JIRA: YARDSTICK-1383 Change-Id: Ic874fb2be1c13009f94eb3a80194bfe81d7a923b Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Diffstat (limited to 'yardstick/tests/unit/benchmark/scenarios/networking')
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py b/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
index 49578b383..6bf2f2c2f 100644
--- a/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
+++ b/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
@@ -405,7 +405,6 @@ class TestNetworkServiceTestCase(unittest.TestCase):
def test___get_traffic_flow(self):
self.scenario_cfg["traffic_options"]["flow"] = \
self._get_file_abspath("ipv4_1flow_Packets_vpe.yaml")
- self.scenario_cfg["options"] = {}
self.scenario_cfg['options'] = {
'flow': {
'src_ip': [
@@ -421,11 +420,10 @@ class TestNetworkServiceTestCase(unittest.TestCase):
'public_ip': ['1.1.1.1'],
},
}
- # NOTE(ralonsoh): check the expected output. This test could be
- # incorrect
- # result = {'flow': {'dst_ip0': '152.16.40.2-152.16.40.254',
- # 'src_ip0': '152.16.100.2-152.16.100.254'}}
- self.assertEqual({'flow': {}}, self.s._get_traffic_flow())
+ expected_flow = {'flow': {'dst_ip_0': '152.16.40.2-152.16.40.254',
+ 'public_ip_0': '1.1.1.1',
+ 'src_ip_0': '152.16.100.2-152.16.100.254'}}
+ self.assertEqual(expected_flow, self.s._get_traffic_flow())
def test___get_traffic_flow_error(self):
self.scenario_cfg["traffic_options"]["flow"] = \