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

Schema testing #171

Merged
merged 8 commits into from
Jan 21, 2020
Merged

Schema testing #171

merged 8 commits into from
Jan 21, 2020

Conversation

zepatrik
Copy link
Member

@zepatrik zepatrik commented Jan 16, 2020

Related issue

closes #165

Proposed changes

This is a first implementation of our schema "snapshot" tester. It will traverse a success and a failure directory and test the schema against files found in there. It also extracts definitions from that schema to test those individually.

Checklist

  • I have read the contributing guidelines
  • I have read the security policy
  • I confirm that this pull request does not address a security vulnerability. If this pull request addresses a security
    vulnerability, I confirm that I got green light (please contact [email protected]) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation within the code base (if appropriate)
  • I have documented my changes in the developer guide (if appropriate)

Further comments

Will maybe end up in it's own package as a stand-alone cli test tool.

@zepatrik
Copy link
Member Author

Data/snapshots/... could also be generated as we "fixed" circular dependencies by not resolving refs and just checking the src of the ref

@zepatrik zepatrik marked this pull request as ready for review January 20, 2020 12:18
@zepatrik zepatrik requested a review from aeneasr January 20, 2020 12:19
Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me! Left some suggestions

docs/config.schema.test.success/allKeys.main.yaml Outdated Show resolved Hide resolved
test/schema_tests.go Outdated Show resolved Hide resolved
test/schema_tests.go Outdated Show resolved Hide resolved
test/schema_tests.go Outdated Show resolved Hide resolved
test/schema_tests.go Outdated Show resolved Hide resolved
test/schema_tests.go Outdated Show resolved Hide resolved
@zepatrik zepatrik requested a review from aeneasr January 21, 2020 13:29
@aeneasr aeneasr merged commit ede9c0e into master Jan 21, 2020
@zepatrik zepatrik deleted the schema-testing branch March 23, 2020 18:47
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.

Schemas should be tested
2 participants