aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator/tests/test_environment_file_parameters.py
diff options
context:
space:
mode:
authorLovett, Trevor <trevor.lovett@att.com>2019-06-14 08:39:16 -0500
committerLovett, Trevor (tl2972) <tl2972@att.com>2019-06-14 08:39:16 -0500
commitf40ff1bf5c95696f78ec6ff1862e6954f360a04f (patch)
treea4043ac8dccc1329b8ddf4034c0833a600083761 /ice_validator/tests/test_environment_file_parameters.py
parentca689124b4e957a7a683a7c49eb4e12703afa09c (diff)
[VVP] Allow multi-line error messages on error reports
Issue-ID: VVP-225 Signed-off-by: Lovett, Trevor (tl2972) <tl2972@att.com> Change-Id: Iebee13d29f8025b3dd5c147f2024a484789464f7
Diffstat (limited to 'ice_validator/tests/test_environment_file_parameters.py')
-rw-r--r--ice_validator/tests/test_environment_file_parameters.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/ice_validator/tests/test_environment_file_parameters.py b/ice_validator/tests/test_environment_file_parameters.py
index 34808b9..010edab 100644
--- a/ice_validator/tests/test_environment_file_parameters.py
+++ b/ice_validator/tests/test_environment_file_parameters.py
@@ -39,6 +39,7 @@
""" environment file structure
"""
import os
+from collections import Iterable
from tests.structures import Heat
from tests.utils import nested_dict
@@ -228,15 +229,21 @@ def run_check_resource_parameter(
if kwargs.get("resource_type_inverse"):
resource_type = "non-{}".format(resource_type)
+ params = (
+ ": {}".format(", ".join(invalid_parameters))
+ if isinstance(invalid_parameters, Iterable)
+ else ""
+ )
+
assert not invalid_parameters, (
"{} {} parameters in template {}{}"
- " found in {} environment file: {}".format(
+ " found in {} environment file{}".format(
resource_type,
prop,
filename,
" not" if DESIRED else "",
environment_pair.get("name"),
- ", ".join(invalid_parameters),
+ params,
)
)