-
Notifications
You must be signed in to change notification settings - Fork 2
cleanup proptests with *_strat fns #131
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i missed describing this in the issue but actly i'd wanted to refactor the tests of all the individual instructions to have a single universal test fn that takes few args. set_admin_test is a good example where it takes the bare min of the instruction, accounts and expected error. Some instructions (or instruction chain in rebalance's case) may need more args - for eg test fn for swap instructions should probably take a Quote as an arg that it can check against.
The reason for doing this is just bec i thought i'd landed on a nice clean understandable pattern there, but lmk if it isnt the case in your opinion or you have suggestions for improvement
We can do this in separate PRs, maybe 1 PR for each instruction
controller/program/tests/tests/admin/set_sol_value_calculator.rs
Outdated
Show resolved
Hide resolved
you can probably express different set of checks to run on success vs on error using a |
i like that pattern, think we can stick with it. let's make a PR per group of ix tests like: |
* cleanup proptests with *_strat fns * add common SetSvcBaseInputs struct in setsvc test
* cleanup proptests with *_strat fns * add common SetSvcBaseInputs struct in setsvc test Co-authored-by: Albert Itayev <[email protected]>
No description provided.