From: Steven Wright Date: Wed, 6 Feb 2019 14:00:02 +0000 (+0000) Subject: Merge "[VVP] revert nested resource section" X-Git-Tag: 5.0.0~70 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vvp%2Fvalidation-scripts.git;a=commitdiff_plain;h=feed1b900bfd975cfd8f382d290c9bb8901e9f49;hp=8293575be685a477bb668af1368a489b0c86755e Merge "[VVP] revert nested resource section" --- diff --git a/ice_validator/tests/test_heat_template_structure.py b/ice_validator/tests/test_heat_template_structure.py index a988aea..192f45a 100644 --- a/ice_validator/tests/test_heat_template_structure.py +++ b/ice_validator/tests/test_heat_template_structure.py @@ -97,18 +97,18 @@ def test_heat_template_structure_contains_parameters(yaml_file): @validates("R-23664") -def test_heat_template_structure_contains_resources(yaml_file): +def test_heat_template_structure_contains_resources(heat_template): """ Check that all heat templates have the required sections """ required_key_values = ["resources"] - with open(yaml_file) as fh: + with open(heat_template) as fh: yml = yaml.load(fh) assert all( [k in yml for k in required_key_values] ), "{} doesn't contain the {} section, but it is required".format( - yaml_file, required_key_values[0] + heat_template, required_key_values[0] ) diff --git a/ice_validator/tests/test_initial_configuration.py b/ice_validator/tests/test_initial_configuration.py index 3ecfb59..83f887c 100644 --- a/ice_validator/tests/test_initial_configuration.py +++ b/ice_validator/tests/test_initial_configuration.py @@ -184,11 +184,11 @@ def test_05_all_get_param_have_defined_parameter(yaml_file): @validates("R-90152") @pytest.mark.base -def test_06_heat_template_resource_section_has_resources(yaml_file): +def test_06_heat_template_resource_section_has_resources(heat_template): found_resource = False - with open(yaml_file) as fh: + with open(heat_template) as fh: yml = yaml.load(fh) resources = yml.get("resources") diff --git a/ice_validator/tests/test_neutron_port_addresses.py b/ice_validator/tests/test_neutron_port_addresses.py index 05b0223..b5ce375 100644 --- a/ice_validator/tests/test_neutron_port_addresses.py +++ b/ice_validator/tests/test_neutron_port_addresses.py @@ -163,7 +163,7 @@ def validate_field(heat, allowed_address_pairs, field, v6=False): if field in allowed_address_pair: param = heat.nested_get(allowed_address_pair, field, "get_param") if param is None: - error = 'allowed_address_pair %s requires "get_param"' % field + # error = 'allowed_address_pair %s requires "get_param"' % field break else: # if v6 and testing v6, or inverse