summaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/scenarios
diff options
context:
space:
mode:
authorDino Madarang <dinox.madarang@intel.com>2017-09-28 18:10:28 +0000
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-28 12:46:07 -0700
commit64e6d4d5eb38109b22a1fa095ace08b55a054642 (patch)
tree0f66ac70ff2f3301869613d78e6485989a6e3c70 /tests/unit/benchmark/scenarios
parent0db868278e13d21998bd677bfc782557d44ab381 (diff)
vnf_generic: Fix str object has no attribute items
When an IP range is specified in src_ip/dst_ip like: src_ip: - '152.16.100.180-152.16.100.181' yardstick would return str object has no attribute items error. This change will return the IP range as is if type is str. Change-Id: I3b097777f0d85b0600207157bebba18987ea2275 Signed-off-by: Dino Simeon Madarang <dinox.madarang@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'tests/unit/benchmark/scenarios')
-rw-r--r--tests/unit/benchmark/scenarios/networking/test_vnf_generic.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py b/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
index fa9b8549d..5b15daca4 100644
--- a/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
+++ b/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
@@ -361,6 +361,12 @@ class TestNetworkServiceTestCase(unittest.TestCase):
def test___init__(self):
assert self.topology
+ def test__get_ip_flow_range_string(self):
+ self.scenario_cfg["traffic_options"]["flow"] = \
+ self._get_file_abspath("ipv4_1flow_Packets_vpe.yaml")
+ result = '152.16.100.2-152.16.100.254'
+ self.assertEqual(result, self.s._get_ip_flow_range('152.16.100.2-152.16.100.254'))
+
def test__get_ip_flow_range(self):
self.scenario_cfg["traffic_options"]["flow"] = \
self._get_file_abspath("ipv4_1flow_Packets_vpe.yaml")