From 96e996ff5a8e214b5e8ef46fe06d3595a6ac4b1a Mon Sep 17 00:00:00 2001 From: JingLu5 Date: Fri, 22 Jul 2016 08:36:37 +0800 Subject: Modify ping scenario output format Change-Id: I38455fd42afaa965612edfaa46e385c7934ff7e7 Signed-off-by: JingLu5 --- tests/unit/benchmark/scenarios/networking/test_ping.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/unit/benchmark/scenarios/networking/test_ping.py b/tests/unit/benchmark/scenarios/networking/test_ping.py index 600974510..8d35b8490 100644 --- a/tests/unit/benchmark/scenarios/networking/test_ping.py +++ b/tests/unit/benchmark/scenarios/networking/test_ping.py @@ -36,6 +36,7 @@ class PingTestCase(unittest.TestCase): args = { 'options': {'packetsize': 200}, + 'target': 'ares.demo' } result = {} @@ -43,14 +44,15 @@ class PingTestCase(unittest.TestCase): mock_ssh.SSH().execute.return_value = (0, '100', '') p.run(result) - self.assertEqual(result, {'rtt': {'10.229.17.105': 100.0}}) + self.assertEqual(result, {'rtt': {'ares': 100.0}}) @mock.patch('yardstick.benchmark.scenarios.networking.ping.ssh') def test_ping_successful_sla(self, mock_ssh): args = { 'options': {'packetsize': 200}, - 'sla': {'max_rtt': 150} + 'sla': {'max_rtt': 150}, + 'target': 'ares.demo' } result = {} @@ -58,14 +60,15 @@ class PingTestCase(unittest.TestCase): mock_ssh.SSH().execute.return_value = (0, '100', '') p.run(result) - self.assertEqual(result, {'rtt': {'10.229.17.105': 100.0}}) + self.assertEqual(result, {'rtt': {'ares': 100.0}}) @mock.patch('yardstick.benchmark.scenarios.networking.ping.ssh') def test_ping_unsuccessful_sla(self, mock_ssh): args = { 'options': {'packetsize': 200}, - 'sla': {'max_rtt': 50} + 'sla': {'max_rtt': 50}, + 'target': 'ares.demo' } result = {} @@ -79,7 +82,8 @@ class PingTestCase(unittest.TestCase): args = { 'options': {'packetsize': 200}, - 'sla': {'max_rtt': 50} + 'sla': {'max_rtt': 50}, + 'target': 'ares.demo' } result = {} -- cgit 1.2.3-korg