Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Bugfix: HA kill process recovery has a conflict
[yardstick.git]
/
yardstick
/
tests
/
unit
/
benchmark
/
scenarios
/
compute
/
test_unixbench.py
diff --git
a/yardstick/tests/unit/benchmark/scenarios/compute/test_unixbench.py
b/yardstick/tests/unit/benchmark/scenarios/compute/test_unixbench.py
index
fec355b
..
e4a8d6e
100644
(file)
--- a/
yardstick/tests/unit/benchmark/scenarios/compute/test_unixbench.py
+++ b/
yardstick/tests/unit/benchmark/scenarios/compute/test_unixbench.py
@@
-1,5
+1,3
@@
-#!/usr/bin/env python
-
##############################################################################
# Copyright (c) 2015 Huawei Technologies Co.,Ltd and other.
#
##############################################################################
# Copyright (c) 2015 Huawei Technologies Co.,Ltd and other.
#
@@
-19,6
+17,7
@@
import mock
from oslo_serialization import jsonutils
from yardstick.benchmark.scenarios.compute import unixbench
from oslo_serialization import jsonutils
from yardstick.benchmark.scenarios.compute import unixbench
+from yardstick.common import exceptions as y_exc
@mock.patch('yardstick.benchmark.scenarios.compute.unixbench.ssh')
@mock.patch('yardstick.benchmark.scenarios.compute.unixbench.ssh')
@@
-124,7
+123,7
@@
class UnixbenchTestCase(unittest.TestCase):
sample_output = '{"single_score":"200.7","parallel_score":"4395.9"}'
mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '')
sample_output = '{"single_score":"200.7","parallel_score":"4395.9"}'
mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '')
- self.assertRaises(
Asser
tionError, u.run, result)
+ self.assertRaises(
y_exc.SLAValida
tionError, u.run, result)
def test_unixbench_unsuccessful_sla_parallel_score(self, mock_ssh):
def test_unixbench_unsuccessful_sla_parallel_score(self, mock_ssh):
@@
-139,7
+138,7
@@
class UnixbenchTestCase(unittest.TestCase):
sample_output = '{"signle_score":"2251.7","parallel_score":"3395.9"}'
mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '')
sample_output = '{"signle_score":"2251.7","parallel_score":"3395.9"}'
mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '')
- self.assertRaises(
Asser
tionError, u.run, result)
+ self.assertRaises(
y_exc.SLAValida
tionError, u.run, result)
def test_unixbench_unsuccessful_script_error(self, mock_ssh):
def test_unixbench_unsuccessful_script_error(self, mock_ssh):
@@
-162,10
+161,3
@@
class UnixbenchTestCase(unittest.TestCase):
mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
self.assertRaises(RuntimeError, u.run, result)
mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
self.assertRaises(RuntimeError, u.run, result)
-
-
-def main():
- unittest.main()
-
-if __name__ == '__main__':
- main()