From eed1b9cca960e7c7a3980d0a94b3589cf6b81eab Mon Sep 17 00:00:00 2001 From: "Mytnyk, Volodymyr" Date: Thu, 16 Aug 2018 08:40:04 +0100 Subject: 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 --- .../unit/benchmark/scenarios/networking/test_vnf_generic.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'yardstick/tests') 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"] = \ -- cgit 1.2.3-korg