aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/scenarios/networking
diff options
context:
space:
mode:
authorEmma Foley <emma.l.foley@intel.com>2018-06-26 09:38:34 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-06-26 09:38:34 +0000
commitaafc77587072fa1a428d9c9cbec47a15e240a694 (patch)
treed49bc76f46803fa9f9fadcf32736441fbf59eacd /yardstick/tests/unit/benchmark/scenarios/networking
parent4c4edf05781b0a7d7368cb29d27ae2e92230c194 (diff)
parent66c5efdd1705281abb57dcb14fff502ad125c0c1 (diff)
Merge "Refactor remote command execution in pktgen_dpdk"
Diffstat (limited to 'yardstick/tests/unit/benchmark/scenarios/networking')
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/yardstick/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py b/yardstick/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py
index b141591f7..bcd417830 100644
--- a/yardstick/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py
+++ b/yardstick/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py
@@ -165,7 +165,7 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase):
self.mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '')
self.assertRaises(y_exc.SLAValidationError, p.run, result)
- def test_pktgen_dpdk_unsuccessful_script_error(self):
+ def test_pktgen_dpdk_run_unsuccessful_get_port_mac(self):
args = {
'options': {'packetsize': 60},
@@ -177,3 +177,19 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase):
self.mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
self.assertRaises(RuntimeError, p.run, result)
+
+ def test_pktgen_dpdk_run_unsuccessful_script_error(self):
+ args = {
+ 'options': {'packetsize': 60}
+ }
+
+ p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx)
+
+ self.mock_ssh.SSH.from_node().execute.side_effect = ((0, '', ''),
+ (0, '', ''),
+ (0, '', ''),
+ (0, '', ''),
+ (0, '', ''),
+ y_exc.SSHError)
+ self.assertRaises(y_exc.SSHError, p.run, {})
+ self.assertEqual(self.mock_ssh.SSH.from_node().execute.call_count, 6)