Code Review
/
doctor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
change test_case option
[doctor.git]
/
doctor_tests
/
main.py
diff --git
a/doctor_tests/main.py
b/doctor_tests/main.py
index
f54b640
..
5bd3c59
100644
(file)
--- a/
doctor_tests/main.py
+++ b/
doctor_tests/main.py
@@
-163,7
+163,13
@@
class DoctorTest(object):
self.test_fault_management()
self.test_maintenance()
else:
self.test_fault_management()
self.test_maintenance()
else:
- getattr(self, self.conf.test_case)()
+ function = 'test_%s' % self.conf.test_case
+ if hasattr(self, function):
+ getattr(self, function)()
+ else:
+ raise Exception('Can not find function <%s> in'
+ 'DoctorTest, see config manual'
+ % function)
except Exception as e:
LOG.error('doctor test failed, Exception=%s' % e)
sys.exit(1)
except Exception as e:
LOG.error('doctor test failed, Exception=%s' % e)
sys.exit(1)