diff options
author | 2019-10-30 10:55:55 +0100 | |
---|---|---|
committer | 2019-10-30 10:57:57 +0100 | |
commit | 68d93c2a8cf5417cca2d4f9dafb30f08451ed24f (patch) | |
tree | 855d79e9165d00562592efe66287e8c6e2df0f0f /test/vcpe/soutils.py | |
parent | 2a75ad689a5024b38c53354973588d2f68da2596 (diff) |
Fix failures return codes in vcpe scripts
Conditional exits on failures should return
with non zero exit code for better behavior
in testing pipelines.
Change-Id: Ied2e699a2cd38cc741e6d9d9a5c88082f09fa549
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Issue-ID: TEST-226
Diffstat (limited to 'test/vcpe/soutils.py')
-rwxr-xr-x | test/vcpe/soutils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/vcpe/soutils.py b/test/vcpe/soutils.py index 7ab429099..2a953e795 100755 --- a/test/vcpe/soutils.py +++ b/test/vcpe/soutils.py @@ -23,7 +23,7 @@ class SoUtils: self.vcpecommon = vcpecommon if api_version not in self.vcpecommon.so_req_api_url: self.logger.error('Incorrect SO API version: %s', api_version) - sys.exit() + sys.exit(1) self.service_req_api_url = self.vcpecommon.so_req_api_url[api_version] def submit_create_req(self, req_json, req_type, service_instance_id=None, vnf_instance_id=None): @@ -240,7 +240,7 @@ class SoUtils: self.logger.error("AAI traversal didn't finish in 30 seconds. Something is wrong. Type {0}, UUID {1}".format( node_type, uuid)) - sys.exit() + sys.exit(1) def create_entire_service(self, csar_file, vnf_template_file, preload_dict, name_suffix, heatbridge=False): """ @@ -319,7 +319,7 @@ class SoUtils: # wait for AAI to complete traversal if not vnf_instance_id: self.logger.error('No VNF instance ID returned!') - sys.exit() + sys.exit(1) self.wait_for_aai('vnf', vnf_instance_id) preloader = preload.Preload(self.vcpecommon) @@ -329,7 +329,7 @@ class SoUtils: if len(parser.vfmodule_models) == 1: if not vnf_instance_id or not vnf_model: self.logger.error('Invalid VNF instance ID or VNF model!') - sys.exit() + sys.exit(1) model = parser.vfmodule_models[0] vfmodule_instance_name = '_'.join([self.vcpecommon.instance_name_prefix['vfmodule'], |