Added Tests + Schema Updates#33
Conversation
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
decause-gov
left a comment
There was a problem hiding this comment.
I left a bunch of comments and questions in here, so I'll wait until we discuss then approve :)
This is foundational work Nat, thank you for leading the way 💡
There was a problem hiding this comment.
Perhaps I'm not understanding how these test work, but should we be reading these examples from elsewhere, like the actual schema file in the repo? If that's not a simple thing, then having it in two places is prolly fine, so long as we remember to update it in both places, but if we don't update both, then would it show the tests passing even if the examples or schemas outside the test have changed?
There was a problem hiding this comment.
True, we would have to update in both places. Re-reading the jsonschema CLI docs, I'm realizing that I can separate each test case in its own json file. I will rework the way we show our examples/tests then!
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
decause-gov
left a comment
There was a problem hiding this comment.
Thanks for answering all the questions. LGTM +1 🚢
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Problem
Another round of schema updates plus a new feature: added tests!
Solution
languagesas a required field to generic schema since it can be easily automatedAdded tests to validate examples against the generic schema and CMS schema using the
jsonschemaCLI:test/gov-schema.jsonvalidates CMS code.json files for compliance with the generic schematest/cms-schema.jsonvalidates CMS code.json files for compliance with the CMS schemaexamples.mdpoint to tests and is up-to-datejson-schema-testsworkflowThis will assist us with keeping the repository up-to-date as we continue to make changes to the schemas in the future.
Result
Thanks to
json-schema-testsworkflow. every PR will run the 2 test suites defined in/schemas/testTest Plan
json-schema-testspassed!