Tests cases uploading to the TestRail suite fails if some env variable from templates doesn't have default value:
Traceback (most recent call last):
File "fuelweb_test/testrail/upload_cases_description.py", line 251, in <module>
main()
File "fuelweb_test/testrail/upload_cases_description.py", line 242, in main
default_test_priority=testrail_default_test_priority
File "fuelweb_test/testrail/upload_cases_description.py", line 74, in get_tests_descriptions
case_state.instance._load_config()
File "/home/jenkins/workspace/8.0-test-reports-Testrail/system_test/tests/actions_base.py", line 48, in _load_config
config = load_yaml(self.config_file)
File "/home/jenkins/workspace/8.0-test-reports-Testrail/system_test/helpers/utils.py", line 107, in load_yaml
return yaml.load(open(path))
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/__init__.py", line 71, in load
return loader.get_single_data()
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 39, in get_single_data
return self.construct_document(node)
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 48, in construct_document
for dummy in generator:
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 398, in construct_yaml_map
value = self.construct_mapping(node)
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 208, in construct_mapping
return BaseConstructor.construct_mapping(self, node, deep=deep)
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 133, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 88, in construct_object
data = constructor(self, node)
File "/home/jenkins/workspace/8.0-test-reports-Testrail/system_test/helpers/utils.py", line 78, in yaml_include
return yaml.load(open(file_name))
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/__init__.py", line 71, in load
return loader.get_single_data()
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 39, in get_single_data
return self.construct_document(node)
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 48, in construct_document
for dummy in generator:
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 398, in construct_yaml_map
value = self.construct_mapping(node)
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 208, in construct_mapping
return BaseConstructor.construct_mapping(self, node, deep=deep)
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 133, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/yaml/constructor.py", line 88, in construct_object
data = constructor(self, node)
File "/home/jenkins/workspace/8.0-test-reports-Testrail/system_test/helpers/utils.py", line 100, in yaml_get_env_variable
filename=loader.name))
ValueError: Environment variable ENV_NAME is not set from shell environment! No default value provided in file /home/jenkins/workspace/8.0-test-reports-Testrail/system_test/tests_templates/devops_configs/default.yaml
Fix proposed to branch: master /review. openstack. org/252400
Review: https:/