Merge "read heat templates file from resources dir"

This commit is contained in:
Zuul 2018-01-24 15:12:13 +00:00 committed by Gerrit Code Review
commit 728523a886
3 changed files with 9 additions and 13 deletions
devstack
vitrage_tempest_tests/tests

@ -29,11 +29,7 @@ if [ "$DEVSTACK_GATE_USE_PYTHON3" == "True" ]; then
export PYTHON=python3
fi
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 -rf $DEVSTACK_PATH/tempest/etc/logging.conf.sample $DEVSTACK_PATH/tempest/etc/logging.conf
sudo cp $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

@ -16,6 +16,8 @@ from oslo_log import log as logging
from vitrage_tempest_tests.tests import utils
from vitrage_tempest_tests.tests.api.topology.base import BaseTopologyTest
from vitrage_tempest_tests.tests.common.general_utils\
import tempest_resources_dir
from vitrage_tempest_tests.tests.common import heat_utils
LOG = logging.getLogger(__name__)
@ -36,21 +38,19 @@ class TestHeatStack(BaseTopologyTest):
@utils.tempest_logger
def test_nested_heat_stack(self):
self._test_heat_stack(
nested=True,
template_file='/etc/vitrage/heat_nested_template.yaml')
self._test_heat_stack(nested=True,
tmpl_file='heat_nested_template.yaml')
@utils.tempest_logger
def test_heat_stack(self):
self._test_heat_stack(
nested=False, template_file='/etc/vitrage/heat_template.yaml')
self._test_heat_stack(nested=False, tmpl_file='heat_template.yaml')
def _test_heat_stack(self, nested, template_file):
def _test_heat_stack(self, nested, tmpl_file):
"""heat stack test
This test validate correctness topology graph with heat stack module
"""
template_file = tempest_resources_dir() + '/heat/' + tmpl_file
try:
# Action
heat_utils.create_stacks(self.NUM_STACKS, nested, template_file)

@ -9,4 +9,4 @@ resources:
properties:
count: 1
resource_def:
type: file:///etc/vitrage/server.yaml
type: server.yaml