From 99edd171057daf29d4bf66cafdf282259fbd1e8b Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Sun, 10 Apr 2016 00:09:33 -0400 Subject: [PATCH] tempest: fix dir_path This patch fix the dir_path that helps to get the directory of Mistral resources. Without this patch, this is what we get when running Tempest: IOError: [Errno 2] No such file or directory: '/usr/lib/python2.7/site-packages/mistral_mistral/tests/resources/openstack/action_collection_wb.yaml' With this patch: /usr/lib/python2.7/site-packages/mistral/tests/resources/openstack/action_collection_wb.yaml This path is correct and Tempest runs successfully. Change-Id: Ie4bd3db8a4e729f7937a6f3c099d7c25abffcb1b Closes-Bug: #1568413 --- mistral_tempest_tests/services/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mistral_tempest_tests/services/base.py b/mistral_tempest_tests/services/base.py index 14fbf3f58..85bfb4819 100644 --- a/mistral_tempest_tests/services/base.py +++ b/mistral_tempest_tests/services/base.py @@ -31,8 +31,8 @@ CONF = config.CONF def get_resource(path): - main_package = 'mistral' - dir_path = __file__[0:__file__.find(main_package) + len(main_package) + 1] + main_package = 'mistral_tempest_tests' + dir_path = __file__[0:__file__.find(main_package)] return open(dir_path + 'mistral/tests/resources/' + path).read()