diff --git a/zaza/openstack/charm_tests/tempest/setup.py b/zaza/openstack/charm_tests/tempest/setup.py index 09d0be9..cc344ba 100644 --- a/zaza/openstack/charm_tests/tempest/setup.py +++ b/zaza/openstack/charm_tests/tempest/setup.py @@ -148,15 +148,15 @@ def render_tempest_config(target_file, ctxt, tempest_template): def setup_tempest(tempest_template, accounts_template): try: - os.makedirs('tempest/etc/') + os.makedirs('tempest_workspace/etc/') except FileExistsError: pass render_tempest_config( - 'tempest/etc/tempest.conf', + 'tempest_workspace/etc/tempest.conf', get_tempest_context(), tempest_template) render_tempest_config( - 'tempest/etc/accounts.yaml', + 'tempest_workspace/etc/accounts.yaml', get_tempest_context(), accounts_template) diff --git a/zaza/openstack/charm_tests/tempest/tests.py b/zaza/openstack/charm_tests/tempest/tests.py index f621a8a..58a31eb 100644 --- a/zaza/openstack/charm_tests/tempest/tests.py +++ b/zaza/openstack/charm_tests/tempest/tests.py @@ -12,8 +12,16 @@ class TempestTest(): test_runner = zaza.charm_lifecycle.test.DIRECT def run(self): + tempest_options = ['init', 'tempest_workspace'] + the_app = tempest.cmd.main.Main() + print(tempest_options) + _exec_tempest = the_app.run(tempest_options) + #if not _exec_tempest: + # return False + charm_config = zaza.charm_lifecycle.utils.get_charm_config() - tempest_options = ['run', '--config', 'tempest/etc/tempest.conf'] + tempest_options = ['run', '--config', 'tempest_workspace/etc/tempest.conf', + '--workspace', 'tempest_workspace'] for model_alias in zaza.model.get_juju_model_aliases().keys(): tempest_test_key = model_alias if model_alias == zaza.charm_lifecycle.utils.DEFAULT_MODEL_ALIAS: