X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vvp%2Fvalidation-scripts.git;a=blobdiff_plain;f=ice_validator%2Ftests%2Ffixtures%2Ftest_ip_parameters_start_at_0%2Ffail%2Ffail.yaml;fp=ice_validator%2Ftests%2Ftest_unique_resources_across_template.py;h=762b9b6fd93fe159e194326c083134f83d54ede3;hp=b811cdb01af213c90d012c609bb3f007492c15ef;hb=1f4df7c7ad27b23773ad9cdbe4db1632ce388cf1;hpb=ca9085f0f77d442d3741a8c754e65cc45b6a318d diff --git a/ice_validator/tests/test_unique_resources_across_template.py b/ice_validator/tests/fixtures/test_ip_parameters_start_at_0/fail/fail.yaml similarity index 66% rename from ice_validator/tests/test_unique_resources_across_template.py rename to ice_validator/tests/fixtures/test_ip_parameters_start_at_0/fail/fail.yaml index b811cdb..762b9b6 100644 --- a/ice_validator/tests/test_unique_resources_across_template.py +++ b/ice_validator/tests/fixtures/test_ip_parameters_start_at_0/fail/fail.yaml @@ -35,34 +35,27 @@ # # ============LICENSE_END============================================ # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# - -import yaml -import pytest -from .utils import yaml_custom_utils -from yaml.constructor import ConstructorError +heat_template_version: 2015-04-30 +description: Simple template to deploy a single compute instance -def test_unique_resources_across_yaml_file(yaml_file): - ''' - Check that all instance names are unique within - a yaml file. - ''' - yaml.add_constructor( - yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, - yaml_custom_utils.raise_duplicates_keys) +parameters: + vm1_nr1_ip_1: + type: string + label: Key Name + description: Name of key-pair to be used for compute instance - try: - with open(yaml_file) as fh: - yaml.load(fh) + vm1_nr1_ip_2: + type: string + label: Key Name + description: Name of key-pair to be used for compute instance - # Assert yaml file dont have resources - # assert len(yml["resources"]) != 0 + vm1_nr1_v6_ip_0: + type: string + label: Key Name + description: Name of key-pair to be used for compute instance - except ConstructorError as ce: - print(ce) - pytest.fail("Unique resources across a yaml file - failed") - except Exception as e: - print(e) - pytest.skip("This yaml file cannot be tested in this test") + vm1_nr1_v6_ip_2: + type: string + label: Key Name + description: Name of key-pair to be used for compute instance \ No newline at end of file