-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #565: tests: Put device specific parameters in Emulator classes
2c59ad3 tests: Explicitly specify multisig types (Andrew Chow) 44314c2 tests: Add strict_bip48 (Andrew Chow) 8299b08 test: Refactor _make_multisigs to make just one multisig (Andrew Chow) 2166793 tests: Use random port for bitcoind (Andrew Chow) 1226752 tests: use Bitcoind class to manage bitcoind (Andrew Chow) 57c2c20 tests: Add -Wno-array-parameter to BitBox01 build (Andrew Chow) 63a9334 tests: Reduce Jade simulator output (Andrew Chow) 9e1ee3f test: remove full_type (Andrew Chow) 0ec28f4 tests: Move device params into emulator object (Andrew Chow) 12d7b59 tests: Make signtx_cases a required argument for TestSignTx only (Andrew Chow) 9926382 tests: Pass in detection type explicitly to TestDeviceConnect (Andrew Chow) ed16b8e tests: Allow DeviceTestcase.parameterize to take arbitrary parameters (Andrew Chow) c86222f tests: Always run superclass start and stop functions (Andrew Chow) 530ed9f tests, ledger: use emulator per-test (Andrew Chow) 5c2e843 tests: Move device specific tests out of ledger_test_suite (Andrew Chow) 649bd9a test, jade: Use emulator per-test (Andrew Chow) f719fd0 tests: Move device specific tests out of jade_test_suite (Andrew Chow) c6b767a tests: Use per-test BitBox01Emulator (Andrew Chow) 019efbb tests: Use per-test ColdcardSimulator (Andrew Chow) Pull request description: Currently we have a bunch of device specific parameters passed into the tests when they are created. However the parameters are almost always the same across test cases, so passing them in individually results in long mostly duplicated lines. Since most tests have a `Emulator` class which manages the emulator, we can instead pack those parameters into the `Emulator` object. This makes the code easier to read, and it allows us to also adjust those parameters at runtime when there are different modes for the emulators. This is particularly important as we implement Taproot as the different combinations of things to test gets much more complicated than can be handled with lookups to global dictionaries. Instead of querying a dictionary and doing comparisons of device type strings, we can directly query the emulator. There were a few test parameters which are test specific. The way that test parameters are passed in have been updated to allow for test specific parameters instead of having those parameters be available to all tests. The Coldcard, Jade, and Ledger have also been updated to use a per-test emulator. Top commit has no ACKs. Tree-SHA512: 955692d1662496063bbca7093ec28e8f551495618a75c319e903bc78a2ea3041e78901ed526d7c7cdace77d2df7e601a7adbda4423b4e6b74b28217ca66fac5a
- Loading branch information
Showing
9 changed files
with
856 additions
and
675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.