aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/scenarios/networking
diff options
context:
space:
mode:
authorMyron Sosyak <myronx.sosyak@intel.com>2018-09-19 14:10:57 +0100
committerTaras Chornyi <tarasx.chornyi@intel.com>2018-11-12 09:00:53 +0000
commitd99cfd9eaac88851d7efbb95292c2752755ae070 (patch)
treef20460834e9e1b5c11335c32dd982304b254defd /yardstick/tests/unit/benchmark/scenarios/networking
parent3fec49e7a3926ddf4f9303ee47a33d109421a573 (diff)
Implement functionality for updating http client
Implemented functionality for updating http client configuration. Extended http_ixload.py with functions for update page object and count of simulated users in http client on netTraffic. JIRA: YARDSTICK-1435 Change-Id: I9a0be226d4201d861d3a764864b42e5d87a4a305 Signed-off-by: Myron Sosyak <myronx.sosyak@intel.com> Signed-off-by: Taras Chornyi <tarasx.chornyi@intel.com>
Diffstat (limited to 'yardstick/tests/unit/benchmark/scenarios/networking')
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py22
1 files changed, 21 insertions, 1 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 90248d1bf..8214782b2 100644
--- a/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
+++ b/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
@@ -325,6 +325,8 @@ class TestNetworkServiceTestCase(unittest.TestCase):
},
},
'options': {
+ 'simulated_users': {'uplink': [1, 2]},
+ 'page_object': {'uplink': [1, 2]},
'framesize': {'64B': 100}
},
'runner': {
@@ -620,6 +622,20 @@ class TestNetworkServiceTestCase(unittest.TestCase):
with self.assertRaises(IOError):
self.s._get_traffic_profile()
+ def test__key_list_to_dict(self):
+ result = self.s._key_list_to_dict("uplink", {"uplink": [1, 2]})
+ self.assertEqual({"uplink_0": 1, "uplink_1": 2}, result)
+
+ def test__get_simulated_users(self):
+ result = self.s._get_simulated_users()
+ self.assertEqual({'simulated_users': {'uplink_0': 1, 'uplink_1': 2}},
+ result)
+
+ def test__get_page_object(self):
+ result = self.s._get_page_object()
+ self.assertEqual({'page_object': {'uplink_0': 1, 'uplink_1': 2}},
+ result)
+
def test___get_traffic_imix_exception(self):
with mock.patch.dict(self.scenario_cfg["traffic_options"], {'imix': ''}):
self.assertEqual({'imix': {'64B': 100}},
@@ -642,7 +658,11 @@ class TestNetworkServiceTestCase(unittest.TestCase):
'flow': {'flow': {}},
'imix': {'imix': {'64B': 100}},
'uplink': {},
- 'duration': 30}
+ 'duration': 30,
+ 'simulated_users': {
+ 'simulated_users': {'uplink_0': 1, 'uplink_1': 2}},
+ 'page_object': {
+ 'page_object': {'uplink_0': 1, 'uplink_1': 2}},}
)
mock_tprofile_get.assert_called_once_with(fake_vnfd)