aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator/tests
diff options
context:
space:
mode:
authorLovett, Trevor <trevor.lovett@att.com>2019-05-30 08:51:43 -0500
committerLovett, Trevor <trevor.lovett@att.com>2019-05-30 08:51:43 -0500
commite97e5f898a2bfeac786b9022ed151665be435376 (patch)
tree6ee622cac440086f083c5854ed45579cc3570d26 /ice_validator/tests
parent32ae86efa75a62edd9e6739236bdc3c0ff87676a (diff)
[VVP] Exempt output section from nested get_param check
Change-Id: Ib87b0fb1c70c5689fc7687a21a27ea60934096b1 Issue-ID: VVP-220 Signed-off-by: Lovett, Trevor <trevor.lovett@att.com>
Diffstat (limited to 'ice_validator/tests')
-rw-r--r--ice_validator/tests/conftest.py6
-rw-r--r--ice_validator/tests/fixtures/test_nested_parameter_args/pass/pass0.yaml3
-rw-r--r--ice_validator/tests/test_nested_parameter_args.py2
3 files changed, 7 insertions, 4 deletions
diff --git a/ice_validator/tests/conftest.py b/ice_validator/tests/conftest.py
index db87e18..a6f83f1 100644
--- a/ice_validator/tests/conftest.py
+++ b/ice_validator/tests/conftest.py
@@ -58,7 +58,7 @@ from six import string_types
import version
import logging
-logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.ERROR)
+logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.ERROR)
__path__ = [os.path.dirname(os.path.abspath(__file__))]
@@ -1058,9 +1058,9 @@ def select_heat_requirements(reqs):
def is_testable(reqs):
"""Filters dict requirements to only those which are testable"""
for key, values in reqs.items():
- if (("MUST" in values.get("keyword", "").upper()) and (
+ if ("MUST" in values.get("keyword", "").upper()) and (
"none" not in values.get("validation_mode", "").lower()
- )):
+ ):
reqs[key]["testable"] = True
else:
reqs[key]["testable"] = False
diff --git a/ice_validator/tests/fixtures/test_nested_parameter_args/pass/pass0.yaml b/ice_validator/tests/fixtures/test_nested_parameter_args/pass/pass0.yaml
index e9bed41..3b95a66 100644
--- a/ice_validator/tests/fixtures/test_nested_parameter_args/pass/pass0.yaml
+++ b/ice_validator/tests/fixtures/test_nested_parameter_args/pass/pass0.yaml
@@ -55,4 +55,5 @@ resources:
get_param: [ cdl, { get_param: num }]
vf_module_id2:
get_param: [ cdl, { get_param: num }]
-
+outputs:
+ prop: {get_param: [list_one, {get_param: [list_two, {get_param: index_two}]}]} \ No newline at end of file
diff --git a/ice_validator/tests/test_nested_parameter_args.py b/ice_validator/tests/test_nested_parameter_args.py
index 9f5e0bb..378d12f 100644
--- a/ice_validator/tests/test_nested_parameter_args.py
+++ b/ice_validator/tests/test_nested_parameter_args.py
@@ -53,6 +53,8 @@ class GetParamChecker:
def __call__(self, keys, param_value, *args, **kwargs):
if isinstance(param_value, str):
return # refers to a string or parameter - this is OK
+ if "outputs" in keys:
+ return # output section is exempt from this requirement
if isinstance(param_value, list):
nested_get_params = (arg for arg in param_value if is_get_param(arg))
args = (call["get_param"] for call in nested_get_params)