Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actions: Add tests to test some of the examples match the schema #233

Merged
merged 2 commits into from
Dec 16, 2022

Conversation

odscjames
Copy link
Collaborator

#57

@odscjames odscjames self-assigned this Dec 15, 2022
@odscjames
Copy link
Collaborator Author

This only tests 2 JSON files - the rest I think are either meant to be broken or are only fragments so are harder to test. Let's get this in then look?

The main work here is generating a fake schema object to pass to the test code so that we test the schema in the repo and NOT the latest version online.

You can check this is working by editing the schema and running tests:

  • changing network "name" to something else and seeing an additional field error come up
  • changing network "name" type to "string" and seeing a JSON schema error come up

The Python checks don't actually use anything directly from the JSON schema files.

Copy link
Contributor

@lgs85 lgs85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and all appears to be working correctly.

@odscjames odscjames merged commit 062de09 into 0.1-dev Dec 16, 2022
@odscjames odscjames deleted the 2022-12-15-examples-tests-1 branch December 16, 2022 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants