Skip to content

Commit

Permalink
tests: Add to make_expected_test_data.sh for pythonvalidate tests
Browse files Browse the repository at this point in the history
This changes the order of some items in the expected files,
but not the content

Also some files show a change of a new line added only.

This will set up future work, so there are smaller diff's in expected
files in future.
  • Loading branch information
jarofgreen committed Nov 9, 2022
1 parent cd113f7 commit 20bcfce
Show file tree
Hide file tree
Showing 18 changed files with 235 additions and 220 deletions.
18 changes: 16 additions & 2 deletions make_expected_test_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,19 @@ libcoveofds jsv tests/fixtures/jsonschemavalidate/basic_1.input.json > tests/fi
libcoveofds jsv tests/fixtures/jsonschemavalidate/bad_uuid_1.input.json > tests/fixtures/jsonschemavalidate/bad_uuid_1.expected.json

# Python validate
# TODO
#libcoveofds pv tests/fixtures/pythonvalidate/basic_1.input.json > tests/fixtures/pythonvalidate/basic_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/basic_1.input.json > tests/fixtures/pythonvalidate/basic_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/end_node_not_found_1.input.json > tests/fixtures/pythonvalidate/end_node_not_found_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/node_international_connections_country_not_set_1.input.json > tests/fixtures/pythonvalidate/node_international_connections_country_not_set_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/node_location_coordinates_incorrect_1.input.json > tests/fixtures/pythonvalidate/node_location_coordinates_incorrect_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/node_location_type_incorrect_1.input.json > tests/fixtures/pythonvalidate/node_location_type_incorrect_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/node_not_used_in_any_spans_1.input.json > tests/fixtures/pythonvalidate/node_not_used_in_any_spans_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/organisation_id_not_found_1.input.json > tests/fixtures/pythonvalidate/organisation_id_not_found_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/organisation_name_not_match_1.input.json > tests/fixtures/pythonvalidate/organisation_name_not_match_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/organisation_reference_name_set_but_not_in_original_1.input.json > tests/fixtures/pythonvalidate/organisation_reference_name_set_but_not_in_original_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/phase_id_not_found_1.input.json > tests/fixtures/pythonvalidate/phase_id_not_found_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/phase_name_not_match_1.input.json > tests/fixtures/pythonvalidate/phase_name_not_match_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/phase_reference_name_set_but_not_in_original_1.input.json > tests/fixtures/pythonvalidate/phase_reference_name_set_but_not_in_original_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/span_route_coordinates_incorrect_1.input.json > tests/fixtures/pythonvalidate/span_route_coordinates_incorrect_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/span_route_type_incorrect_1.input.json > tests/fixtures/pythonvalidate/span_route_type_incorrect_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/start_node_not_found_1.input.json > tests/fixtures/pythonvalidate/start_node_not_found_1.expected.json
libcoveofds pv tests/fixtures/pythonvalidate/start_node_not_found_but_has_external_nodes_1.input.json > tests/fixtures/pythonvalidate/start_node_not_found_but_has_external_nodes_1.expected.json
2 changes: 1 addition & 1 deletion tests/fixtures/pythonvalidate/basic_1.expected.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[]
[]
14 changes: 7 additions & 7 deletions tests/fixtures/pythonvalidate/end_node_not_found_1.expected.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"missing_node_id": "2467",
"type": "span_end_node_not_found"
}
]
{
"type": "span_end_node_not_found",
"missing_node_id": "2467",
"span_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
}
]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "1",
"type": "node_international_connections_country_not_set"
}
]
{
"type": "node_international_connections_country_not_set",
"node_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
}
]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "1",
"type": "node_location_coordinates_incorrect"
}
]
{
"type": "node_location_coordinates_incorrect",
"node_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
}
]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "1",
"type": "node_location_type_incorrect"
}
]
{
"type": "node_location_type_incorrect",
"node_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
}
]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "3",
"type": "node_not_used_in_any_spans"
}
]
{
"type": "node_not_used_in_any_spans",
"node_id": "3",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
}
]
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
[
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "1",
"type": "node_organisation_reference_id_not_found",
"field": "networkProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "1",
"type": "node_organisation_reference_id_not_found",
"field": "physicalInfrastructureProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"phase_id": "1",
"type": "phase_organisation_reference_id_not_found"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"type": "span_organisation_reference_id_not_found",
"field": "networkProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"type": "span_organisation_reference_id_not_found",
"field": "physicalInfrastructureProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"type": "span_organisation_reference_id_not_found",
"field": "supplier"
}
]
{
"type": "node_organisation_reference_id_not_found",
"node_id": "1",
"field": "physicalInfrastructureProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "node_organisation_reference_id_not_found",
"node_id": "1",
"field": "networkProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "span_organisation_reference_id_not_found",
"span_id": "1",
"field": "physicalInfrastructureProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "span_organisation_reference_id_not_found",
"span_id": "1",
"field": "networkProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "span_organisation_reference_id_not_found",
"span_id": "1",
"field": "supplier",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "phase_organisation_reference_id_not_found",
"phase_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
}
]
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
[
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "1",
"type": "node_organisation_reference_name_does_not_match",
"field": "networkProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "1",
"type": "node_organisation_reference_name_does_not_match",
"field": "physicalInfrastructureProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"phase_id": "1",
"type": "phase_organisation_reference_name_does_not_match"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"type": "span_organisation_reference_name_does_not_match",
"field": "networkProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"type": "span_organisation_reference_name_does_not_match",
"field": "physicalInfrastructureProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"type": "span_organisation_reference_name_does_not_match",
"field": "supplier"
}
]
{
"type": "node_organisation_reference_name_does_not_match",
"node_id": "1",
"field": "physicalInfrastructureProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "node_organisation_reference_name_does_not_match",
"node_id": "1",
"field": "networkProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "span_organisation_reference_name_does_not_match",
"span_id": "1",
"field": "physicalInfrastructureProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "span_organisation_reference_name_does_not_match",
"span_id": "1",
"field": "networkProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "span_organisation_reference_name_does_not_match",
"span_id": "1",
"field": "supplier",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "phase_organisation_reference_name_does_not_match",
"phase_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
}
]
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
[
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "1",
"type": "node_organisation_reference_name_set_but_not_in_original",
"field": "networkProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "1",
"type": "node_organisation_reference_name_set_but_not_in_original",
"field": "physicalInfrastructureProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"phase_id": "1",
"type": "phase_organisation_reference_name_set_but_not_in_original"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"type": "span_organisation_reference_name_set_but_not_in_original",
"field": "networkProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"type": "span_organisation_reference_name_set_but_not_in_original",
"field": "physicalInfrastructureProvider"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"type": "span_organisation_reference_name_set_but_not_in_original",
"field": "supplier"
}
]
{
"type": "node_organisation_reference_name_set_but_not_in_original",
"node_id": "1",
"field": "physicalInfrastructureProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "node_organisation_reference_name_set_but_not_in_original",
"node_id": "1",
"field": "networkProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "span_organisation_reference_name_set_but_not_in_original",
"span_id": "1",
"field": "physicalInfrastructureProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "span_organisation_reference_name_set_but_not_in_original",
"span_id": "1",
"field": "networkProvider",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "span_organisation_reference_name_set_but_not_in_original",
"span_id": "1",
"field": "supplier",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "phase_organisation_reference_name_set_but_not_in_original",
"phase_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
}
]
32 changes: 16 additions & 16 deletions tests/fixtures/pythonvalidate/phase_id_not_found_1.expected.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"contract_id": "1",
"type": "contract_related_phase_reference_id_not_found"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "1",
"type": "node_phase_reference_id_not_found"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"type": "span_phase_reference_id_not_found"
}
]
{
"type": "node_phase_reference_id_not_found",
"node_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "span_phase_reference_id_not_found",
"span_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "contract_related_phase_reference_id_not_found",
"contract_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
}
]
32 changes: 16 additions & 16 deletions tests/fixtures/pythonvalidate/phase_name_not_match_1.expected.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"contract_id": "1",
"type": "contract_related_phase_reference_name_does_not_match"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"node_id": "1",
"type": "node_phase_reference_name_does_not_match"
},
{
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"span_id": "1",
"type": "span_phase_reference_name_does_not_match"
}
]
{
"type": "node_phase_reference_name_does_not_match",
"node_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "span_phase_reference_name_does_not_match",
"span_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
},
{
"type": "contract_related_phase_reference_name_does_not_match",
"contract_id": "1",
"network_id": "a096d627-72e1-4f9b-b129-951b1737bff4"
}
]
Loading

0 comments on commit 20bcfce

Please sign in to comment.