test(provider-pipeline): reject unsafe or conflicting render evidence
This commit is contained in:
@@ -42,6 +42,14 @@ class ProviderPipelineContractTests(unittest.TestCase):
|
||||
rows[0]["renderEvidence"]["components"][0][key] = components[0][{"styleLayerId": "style_layer_id", "styleIndex": "style_index"}[key]]
|
||||
rows[0]["renderEvidence"]["sourceLayer"] = "wrong"
|
||||
self.assertTrue(any("sourceLayer:mismatch" in x for x in validate_mapping(mapping, style)))
|
||||
rows[0]["renderEvidence"]["sourceLayer"] = "points"
|
||||
rows[0]["renderEvidence"]["geometryRole"] = "eval(1)"
|
||||
self.assertTrue(any("script_forbidden" in x for x in validate_mapping(mapping, style)))
|
||||
rows[0]["renderEvidence"]["geometryRole"] = "Point"
|
||||
duplicate = json.loads(json.dumps(rows[0]))
|
||||
duplicate["renderEvidence"]["occurrenceCount"] = 124
|
||||
mapping["assignments"].append(duplicate)
|
||||
self.assertTrue(any("nondeterministic_duplicate" in x for x in validate_mapping(mapping, style)))
|
||||
|
||||
def test_execution_catalog_style_hash_and_schema(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
|
||||
Reference in New Issue
Block a user