X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ice_validator%2Ftests%2Ftest_unique_resources_across_all_templates.py;h=2d051475fd040ba549d039e4413ac60a0e74d8a3;hb=c42086a36bbfaf9286e1c08330f25d1b06a35f4b;hp=13b4121b94682737b26f8e749287a11c049bd65f;hpb=cc21b8b08b6dbcec577bfb26ff397ac899da8002;p=vvp%2Fvalidation-scripts.git diff --git a/ice_validator/tests/test_unique_resources_across_all_templates.py b/ice_validator/tests/test_unique_resources_across_all_templates.py index 13b4121..2d05147 100644 --- a/ice_validator/tests/test_unique_resources_across_all_templates.py +++ b/ice_validator/tests/test_unique_resources_across_all_templates.py @@ -37,10 +37,12 @@ # # ECOMP is a trademark and service mark of AT&T Intellectual Property. # - +from .helpers import validates import yaml +import collections +@validates('R-16447') def test_unique_resources_across_all_yaml_files(yaml_files): ''' Check that all instance names are unique @@ -54,4 +56,8 @@ def test_unique_resources_across_all_yaml_files(yaml_files): continue resources_ids.extend(yml['resources'].keys()) - assert len(resources_ids) == len(set(resources_ids)) + dup_ids = [item + for item, count in collections.Counter(resources_ids).items() + if count > 1] + + assert not dup_ids