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
This commit is contained in:
Emilien Macchi 2016-04-10 00:09:33 -04:00
parent fcfb271607
commit 99edd17105
1 changed files with 2 additions and 2 deletions

View File

@ -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()