diff options
Diffstat (limited to 'ice_validator')
5 files changed, 9 insertions, 15 deletions
diff --git a/ice_validator/tests/conftest.py b/ice_validator/tests/conftest.py index 3ab1aba..2c88ece 100644 --- a/ice_validator/tests/conftest.py +++ b/ice_validator/tests/conftest.py @@ -714,6 +714,10 @@ def collect_errors(r_id, collection_failures, test_result): return [e for e in errors if e] +def relative_paths(base_dir, paths): + return [os.path.relpath(p, base_dir) for p in paths] + + def generate_json(outpath, template_path, categories): """ Creates a JSON summary of the entire test run. @@ -721,7 +725,9 @@ def generate_json(outpath, template_path, categories): reqs = load_current_requirements() data = { "version": "dublin", - "template_directory": template_path, + "template_directory": os.path.splitdrive(template_path)[1].replace( + os.path.sep, "/" + ), "timestamp": make_iso_timestamp(), "checksum": hash_directory(template_path), "categories": categories, @@ -745,7 +751,7 @@ def generate_json(outpath, template_path, categories): for result in ALL_RESULTS: results.append( { - "files": result.files, + "files": relative_paths(template_path, result.files), "test_module": result.test_module, "test_case": result.test_case, "result": result.outcome, diff --git a/ice_validator/tests/fixtures/test_server_parameters/fail/fail.yaml b/ice_validator/tests/fixtures/test_server_parameters/fail/fail.yaml index 55fbaa2..4d41634 100644 --- a/ice_validator/tests/fixtures/test_server_parameters/fail/fail.yaml +++ b/ice_validator/tests/fixtures/test_server_parameters/fail/fail.yaml @@ -43,8 +43,6 @@ description: base parameters: - vm_role: - type: number vnf_id: type: number vf_module_id: @@ -63,7 +61,6 @@ resources: type: OS::Nova::Server properties: metadata: - vm_role: { get_param: vm_role } vnf_id: { get_param: vnf_id } vf_module_id: { get_param: vf_module_id } vnf_name: { get_param: vnf_name } diff --git a/ice_validator/tests/fixtures/test_server_parameters/pass/pass.yaml b/ice_validator/tests/fixtures/test_server_parameters/pass/pass.yaml index d61a2f0..c4bdcef 100644 --- a/ice_validator/tests/fixtures/test_server_parameters/pass/pass.yaml +++ b/ice_validator/tests/fixtures/test_server_parameters/pass/pass.yaml @@ -43,8 +43,6 @@ description: base parameters: - vm_role: - type: string vnf_id: type: string vf_module_id: @@ -63,7 +61,6 @@ resources: type: OS::Nova::Server properties: metadata: - vm_role: { get_param: vm_role } vnf_id: { get_param: vnf_id } vf_module_id: { get_param: vf_module_id } vnf_name: { get_param: vnf_name } diff --git a/ice_validator/tests/test_network_format.py b/ice_validator/tests/test_network_format.py index df49e66..9d3062a 100644 --- a/ice_validator/tests/test_network_format.py +++ b/ice_validator/tests/test_network_format.py @@ -118,7 +118,7 @@ def test_network_resource_id_format(yaml_file): assert not set(invalid_networks), ( "Heat templates must only create internal networks " - "and follow format int_{network-role}_network" + "and follow format int_{{network-role}}_network" "{}".format(", ".join(invalid_networks)) ) diff --git a/ice_validator/tests/test_server_parameters.py b/ice_validator/tests/test_server_parameters.py index 7eb84cb..c72080c 100644 --- a/ice_validator/tests/test_server_parameters.py +++ b/ice_validator/tests/test_server_parameters.py @@ -165,12 +165,6 @@ def test_vf_module_name_parameter_type_and_parameter_name(yaml_file): check_server_parameter_name(yaml_file, "vf_module_name", "vf_module_name") -@validates("R-95430") -def test_vm_role_parameter_type_and_parameter_name(yaml_file): - check_parameter_type(yaml_file, "vm_role", "string") - check_server_parameter_name(yaml_file, "vm_role", "vm_role") - - @validates("R-54340") def test_vf_module_index_parameter_type_and_parameter_name(yaml_file): check_parameter_type(yaml_file, "vf_module_index", "number") |