diff options
Diffstat (limited to 'ice_validator/tests')
-rw-r--r-- | ice_validator/tests/test_incremental_module.py | 8 | ||||
-rw-r--r-- | ice_validator/tests/test_nested_template_parameters.py | 3 | ||||
-rw-r--r-- | ice_validator/tests/test_port_resource_ids.py | 5 |
3 files changed, 11 insertions, 5 deletions
diff --git a/ice_validator/tests/test_incremental_module.py b/ice_validator/tests/test_incremental_module.py index 606dfe4..47c7901 100644 --- a/ice_validator/tests/test_incremental_module.py +++ b/ice_validator/tests/test_incremental_module.py @@ -50,10 +50,14 @@ def test_incremental_module_has_server(yaml_files): servers = Heat(filepath=module).get_resource_by_type( "OS::Nova::Server", all_resources=True ) - if not servers: + volumes = Heat(filepath=module).get_resource_by_type( + "OS::Cinder::Volume", all_resources=True + ) + if not (servers or volumes): errors.append(os.path.basename(module)) assert not errors, ( - "The following incremental modules do not contain an OS::Nova::Server " + "The following incremental modules do not contain at least one " + "OS::Nova::Server or OS::Cinder::Volume " "as required: {}".format(", ".join(errors)) ) diff --git a/ice_validator/tests/test_nested_template_parameters.py b/ice_validator/tests/test_nested_template_parameters.py index 016ebc9..66d8adc 100644 --- a/ice_validator/tests/test_nested_template_parameters.py +++ b/ice_validator/tests/test_nested_template_parameters.py @@ -72,8 +72,7 @@ def validate_parms(dirname, basename, nested, nested_props, prop_type): if additional: bad.append( "%s properties %s not defined as " - "parameters in %s" - % (rid, list(additional), nested_filepath) + "parameters in %s" % (rid, list(additional), nested_filepath) ) return bad diff --git a/ice_validator/tests/test_port_resource_ids.py b/ice_validator/tests/test_port_resource_ids.py index be74349..1648300 100644 --- a/ice_validator/tests/test_port_resource_ids.py +++ b/ice_validator/tests/test_port_resource_ids.py @@ -123,7 +123,10 @@ def test_port_resource_ids(yaml_file): network_type = get_network_type_from_port(port_resource) if not network_type: invalid_ports.append( - (port_id, "Unable to determine network type for port (internal or external).") + ( + port_id, + "Unable to determine network type for port (internal or external).", + ) ) continue |