diff --git a/devstack/post_test_hook.sh b/devstack/post_test_hook.sh index 403a9ad61..315ff7aa4 100644 --- a/devstack/post_test_hook.sh +++ b/devstack/post_test_hook.sh @@ -29,11 +29,11 @@ if [ "$DEVSTACK_GATE_USE_PYTHON3" == "True" ]; then export PYTHON=python3 fi -sudo cp -rf $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/tests/resources/static_physical/static_physical_configuration.yaml /etc/vitrage/ sudo cp -rf $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/tests/resources/heat/heat_template.yaml /etc/vitrage/ sudo cp -rf $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/tests/resources/heat/heat_nested_template.yaml /etc/vitrage/ sudo cp -rf $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/tests/resources/heat/server.yaml /etc/vitrage/ -sudo cp $DEVSTACK_PATH/tempest/etc/logging.conf.sample $DEVSTACK_PATH/tempest/etc/logging.conf + +sudo cp -rf $DEVSTACK_PATH/tempest/etc/logging.conf.sample $DEVSTACK_PATH/tempest/etc/logging.conf ${PYTHON:-python} $DEVSTACK_PATH/vitrage/vitrage_tempest_tests/add_legacy_dir_templates.py diff --git a/vitrage_tempest_tests/add_legacy_dir_templates.py b/vitrage_tempest_tests/add_legacy_dir_templates.py index 353eb7ff4..137bc085f 100644 --- a/vitrage_tempest_tests/add_legacy_dir_templates.py +++ b/vitrage_tempest_tests/add_legacy_dir_templates.py @@ -34,5 +34,6 @@ def main(): full_path = resources_path + f TestConfiguration.add_templates(full_path) + if __name__ == "__main__": sys.exit(main()) diff --git a/vitrage_tempest_tests/tests/datasources/test_static_physical.py b/vitrage_tempest_tests/tests/datasources/test_static_physical.py index c57155e46..302e03e66 100644 --- a/vitrage_tempest_tests/tests/datasources/test_static_physical.py +++ b/vitrage_tempest_tests/tests/datasources/test_static_physical.py @@ -18,6 +18,8 @@ import time from oslo_log import log as logging from vitrage_tempest_tests.tests.base import BaseVitrageTempest +from vitrage_tempest_tests.tests.common.general_utils \ + import tempest_resources_dir from vitrage_tempest_tests.tests import utils LOG = logging.getLogger(__name__) @@ -71,7 +73,8 @@ class TestStaticPhysical(BaseVitrageTempest): hostname = socket.gethostname() # template file - file_path = '/etc/vitrage/static_physical_configuration.yaml' + resources_path = tempest_resources_dir() + '/static_physical/' + file_path = resources_path + '/static_physical_configuration.yaml' with open(file_path, 'r') as f: template_data = f.read() template_data = template_data.replace('tmp-devstack', hostname)