-
Notifications
You must be signed in to change notification settings - Fork 1
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
tests: Update processor tests to use mollusk #16
base: main
Are you sure you want to change the base?
Conversation
3eb2121
to
93e1636
Compare
2388324
to
5b92af3
Compare
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 think this approach will definitely work for what we're after.
First of all, it's doing the same thing as the existing tests, with the exception of using real syscall stubs, which is the safest way to port everything over. Furthermore, I believe enabling fixture generation from instruction chains will be quite trivial, so this would still allow us to generate loads of fixtures for conformance testing between different versions of token programs.
The only downside here is that we'll end up generating fixtures for every single "setup instruction" as well as the real instructions we are testing. But that isn't really a problem aside from being redundant.
The obvious alternative here is to use a few helpers that can set up mints, accounts, etc. beforehand and just invoke each Mollusk instance one at a time, but that could introduce a bug along the way in the account setup.
I think this works!
ad5ab8b
to
cfe754f
Compare
Problem
PR #14 updated the tests crate to use mollusk, but there are few more tests under the processor module.
Solution
Move the processor tests to the
tests
crate and update them to use mollusk.