Merge "get 'test_case' option form environment variable"
authorwenjuan dong <dong.wenjuan@zte.com.cn>
Mon, 16 Apr 2018 02:57:49 +0000 (02:57 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 16 Apr 2018 02:57:49 +0000 (02:57 +0000)
doctor_tests/scenario/__init__.py
etc/doctor.sample.conf

index b9dfa30..4278bb2 100644 (file)
@@ -6,12 +6,15 @@
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
+import os
+
 from oslo_config import cfg
 
 
 OPTS = [
     cfg.StrOpt('test_case',
-               default='fault_management',
+               default=os.environ.get('TEST_CASE', 'fault_management'),
+               choices=['all', 'fault_management', 'maintenance'],
                help="A name of test case to be executed,"
                     " choices are 'all', 'fault_management' or 'maintenance'."
                     " Set 'all' to execute all the test cases existing in"
index 6eeea3a..0e8a49b 100644 (file)
@@ -51,3 +51,6 @@
 #type = sample
 #ip = 127.0.0.1
 #port = 12346
+
+[scenario]
+#test_case = fault_management