diff options
author | Lovett, Trevor <trevor.lovett@att.com> | 2019-06-05 10:13:46 -0500 |
---|---|---|
committer | Trevor Lovett <trevor.lovett@att.com> | 2019-06-05 15:29:28 +0000 |
commit | da26f1709fa5406ee3efebdb82d2c43fcf0122a1 (patch) | |
tree | 47865e1cf8034f8fb88ebb83990d552f6bf20074 /ice_validator/tests/test_volume_templates.py | |
parent | e97e5f898a2bfeac786b9022ed151665be435376 (diff) |
[VVP] Performance Enhancements (report generation and test collection)
Issue-ID: VVP-222
Signed-off-by: Lovett, Trevor (tl2972) <tl2972@att.com>
Change-Id: I9dd3506097cb0d6e69bd1434b2d42f6d1965023b
Diffstat (limited to 'ice_validator/tests/test_volume_templates.py')
-rw-r--r-- | ice_validator/tests/test_volume_templates.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/ice_validator/tests/test_volume_templates.py b/ice_validator/tests/test_volume_templates.py index f65d6d1..634da5c 100644 --- a/ice_validator/tests/test_volume_templates.py +++ b/ice_validator/tests/test_volume_templates.py @@ -52,24 +52,16 @@ def test_volume_templates_contains_cinder_or_resource_group(volume_template): in fact volume templates """ acceptable_resources = [] - - with open(volume_template) as fh: - yml = yaml.load(fh) - - # skip if resources are not defined - if "resources" not in yml: - pytest.skip("No resources specified in the heat template") - dirname = os.path.dirname(volume_template) - list_of_files = get_list_of_nested_files(yml, dirname) + list_of_files = get_list_of_nested_files(volume_template, dirname) list_of_files.append(volume_template) for file in list_of_files: with open(file) as fh: yml = yaml.load(fh) - - for k, v in yml["resources"].items(): + resources = yml.get("resources") or {} + for k, v in resources.items(): if not isinstance(v, dict): continue if "type" not in v: |