Used heat_template argument which loops through for each base template
Created a list of base and it's nested templates for the test
Issue-ID: VVP-230
Signed-off-by: Lokur, Manish <manish.shivakumar.lokur@att.com>
Change-Id: I84d14ed61ac79d83894a47a79954f4ce8ac1615e
"""
resource property name
"""
"""
resource property name
"""
import pytest
from .structures import Heat
from .structures import HeatProcessor
from .helpers import validates
import pytest
from .structures import Heat
from .structures import HeatProcessor
from .helpers import validates
+from tests.utils import nested_files
-def test_non_server_name_unique(yaml_files):
+def test_non_server_name_unique(heat_template):
"""Test name has unique value
"""
"""Test name has unique value
"""
+ list_nest = nested_files.get_list_of_nested_files(heat_template, os.path.dirname(heat_template))
+ list_nest.append(heat_template)
- for yaml_file in yaml_files:
+ for yaml_file in list_nest:
h = Heat(filepath=yaml_file)
non_servers.update(get_non_servers(h))
names = collections.defaultdict(set)
h = Heat(filepath=yaml_file)
non_servers.update(get_non_servers(h))
names = collections.defaultdict(set)
assert not bad, "Names must be unique," " not shared across resource ids.%s%s" % (
delim,
delim.join("%s: %s" % (name, list(value)) for name, value in bad.items()),
assert not bad, "Names must be unique," " not shared across resource ids.%s%s" % (
delim,
delim.join("%s: %s" % (name, list(value)) for name, value in bad.items()),
+ )
\ No newline at end of file