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

Ledger test suite #1640

Open
wants to merge 27 commits into
base: stable
Choose a base branch
from
Open

Ledger test suite #1640

wants to merge 27 commits into from

Conversation

jagerman
Copy link
Member

@jagerman jagerman commented May 3, 2023

This adds a high-level test suite for the Ledger wallet, along with a few small changes for the stable branch needed to make the test suite code work.

jagerman and others added 27 commits April 27, 2023 14:14
This command (supported only on debug builds) lets the wallet force
reset the Ledger device onto the given network type for testing
purposes.
This *substantially* increases the Ledger wallet startup time for
testing.
This was returning the base task exception, but that is often a timeout
because of the interaction failure, so show the interaction failure
instead.
On mainnet, you can disable (by design) use of the shared-ringdb by
using `--shared-ringdb-dir` with an empty argument, but the code
handling the argument on testnet/devnet/fakenet appended
`testnet`/`devnet`/`fake` to the path, which made it non-empty and thus
failed to disable it as intended.

This fixes it.
The shared-ringdb appears to be buggy (in that it sometimes fails to
return outputs it should know about) when interacting with a very short
chain, as we have for all of the fakechain ledger tests, so just disable
it to avoid hitting those bugs.
We need a new, fresh network every time because there often aren't
enough funds otherwise to conduct tests (plus it makes tests difficult
to repeat since the selection and order of tests can change things).
`balance(x)` is a shortcut for `coins(x, x)`, which is particularly
useful in a bunch of places where `x` is a complex expression and so
currently we're doing messy things like `(coins(xxxxxxxxxxxx),) * 2`.

StoreFee() is a helper class for storing a fee, replacing the
`store_fee()` function that was heavily duplicated in the test code.
- Fix NanoX multi-value reader to read all the lines instead of just
  line 2.
- Add a bunch of hacky workarounds for the broken NanoX speculos support
  (it omits any "S"s on the screen).
- Add a README describing how to run it all
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.

None yet

2 participants