mozilla / jsonschema-transpiler

Compile JSON Schema into Avro and BigQuery schemas
Mozilla Public License 2.0
43 stars 9 forks source link

Add integration tests against reference data #62

Open acmiyaguchi opened 5 years ago

acmiyaguchi commented 5 years ago

The test suite currently has a hand-curated set of expected outputs for the schemas. However, the resulting schema may not be valid against certain edge-cases. For each of the test cases under tests/resources/, there should be a json document that passes validation. This can be used for validating that transformations are working correctly.

This testing script was useful for validating sampled data from the aws pipeline against mozilla-pipeline-schemas.

https://github.com/mozilla/jsonschema-transpiler/blob/a7ab35847cac2bf69f2f4301c0dc43039316187c/scripts/mps-generate-avro-data-helper.py#L35-L77