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

validation: add chain config negative testing #686

Open
geoknee opened this issue Nov 15, 2024 · 2 comments
Open

validation: add chain config negative testing #686

geoknee opened this issue Nov 15, 2024 · 2 comments
Assignees
Labels
A-validation Area: validation

Comments

@geoknee
Copy link
Collaborator

geoknee commented Nov 15, 2024

Much or our validation code is untested, which means we are very prone to bugs like this #685.

We should be using local dummy data to ensure validation checks catch chains with non-standard or missing data. We should refactor tests as necessary to enable them to be tested in this way.

@geoknee
Copy link
Collaborator Author

geoknee commented Nov 25, 2024

One area that seems particularly brittle is the parsing of the standard TOML files. Coupled with the approach we take to ignore empty structs in several places, small typos break things easily. See #705.

@geoknee
Copy link
Collaborator Author

geoknee commented Nov 25, 2024

The direction I would like us to take on this is to:

  • move as much of the complexity as possible into pure functions which live in regular .go files (NOT _test.go files)
  • this formalizes that code as production code, not test code
  • this makes the code easy to test without putting fake data on chain
  • we add codecov to this repo and start ramping up the coverage of this newly ordained "production code' by writing tests for it

@bitwiseguy bitwiseguy changed the title validation: add tests for the tests validation: add chain config negative testing Nov 26, 2024
@bitwiseguy bitwiseguy self-assigned this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-validation Area: validation
Projects
None yet
Development

No branches or pull requests

2 participants