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

Update the dev process wiki to describe how to write tests for zcash_client_sqlite migrations #1674

Open
str4d opened this issue Dec 30, 2024 · 0 comments

Comments

@str4d
Copy link
Contributor

str4d commented Dec 30, 2024

In fe5c33e a migration test is converted from "create a pre-migration state, test the migration changes it appropriately" to "test that the correct post-migration state is created". However, in general we will want to have both kinds of tests, particularly when fixing bugs with migrations:

  • A test to ensure that a new wallet doesn't have the bug.
  • A test to ensure that an existing wallet that suffers from the bug is fixed by the migration.

The second kind of test is however only most useful up until the next public release, after which we can generally remove it. And indeed in the commit above, we are removing the "text existing" test because the infrastructure requred to create the broken state is changing sufficiently that we can no longer do so. That being said, if we add a "golden test" framework (#1676) then we'd only need the ability to generate the broken state once, and could then reuse it indefinitely.

We should add a section to https://github.com/zcash/librustzcash/wiki describing the general process for this.

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

No branches or pull requests

1 participant