opengeospatial / bblocks-postprocess

0 stars 0 forks source link

Support external ref: to remote failure tests #27

Closed rob-metalinkage closed 6 months ago

rob-metalinkage commented 6 months ago

Use Case: (e.g. SOSA) - a specification defines a set of failure test cases - (potentially with SHACL rules, but may be simply examples violating specification clauses)

If we use these in examples.yaml the validation logic fails - failures do not respect expected fail test

suggestion: Allow an optional tests.yaml that supports failure testing - could be snippets-fail: or something since we may not be able to rely on file naming.

tests/* should still automatically test.

avillar commented 6 months ago

I've implemented this functionality:

I've also added .yml and .yaml files to the validation pipeline, as if they were JSON. And fixed some code that was being too lenient when parsing JSON examples (I was using the YAML parser for this, so trailing commas and missing quotes were being accepted as valid JSON, which they shouldn't).

Traditional tests/* and examples should keep on working as before (please let me know if they don't).