Commit Graph

27 Commits

Author SHA1 Message Date
Andrew Chow
49bc7fa5da Add tests for stdin interface and travis job 2019-03-11 10:23:45 -04:00
Andrew Chow
8931ae0e90 Run tests using the binary distribution 2019-03-08 00:42:43 -05:00
Andrew Chow
1a2b67d1f3 Test how a very large transaction is handled 2019-02-19 10:21:58 -05:00
Andrew Chow
e594a0b4b3 Allow specifiying a different interface for using HWI in tests 2019-02-19 10:21:58 -05:00
Andrew Chow
2d622046ce Use descriptors with checksums in TestSignTx 2019-02-17 18:11:18 -05:00
Sjors Provoost
a71658cf6d
displayaddress: descriptor support, make --path a named argument 2019-02-15 08:44:41 +01:00
Andrew Chow
5c54c0f6ee Add tests and fixes for invalid paths 2019-02-10 10:45:29 -05:00
Andrew Chow
a7d0121c7b Tests for nonexistent fingerprints and device types 2019-02-10 10:45:29 -05:00
Andrew Chow
cd0c994d6d Test signtx with all three output types as tx outputs 2019-02-10 10:45:29 -05:00
Andrew Chow
2ddd4ed41a Refactor to make hwilib more like a library
Moves the command argument parsing to hwi.py. Instead of each function
taking args and client, they now take client and whatever else they
need. hwi.py handles the conversion from args and client to the actual
arguments.
2019-01-19 16:58:31 -05:00
Andrew Chow
b404a5050d Include the device type in test case output 2019-01-14 15:42:27 -05:00
Andrew Chow
8ddf434489 Refactor tests to optionally have emulator start and stop for each test
The trezor and keepkey emulators use the same port so they cannot
be run at the same time. To work around this, the emulators are
instead started and stopped before and after each test using
unittest's setUp and tearDown functions. However, other devices
which do not have conflicts can still be run at test suite creation
time. This is still done for the coldcard.

Furthermore, since the trezor and keepkey both create and use
emulator.img files in the current working directory, when they are
started, the working directory is changed to be the one containing
the emulator executable to avoid conflicting emulator.img files
2019-01-12 21:45:42 -05:00
Andrew Chow
a3f31aae60 Add keepkey automated test 2019-01-12 21:45:42 -05:00
Andrew Chow
3578ecaee5
Merge #96: Bitbox test
41d3fae Digital Bitbox manual tests (Andrew Chow)
a834e13 Allow providing device passwords for manual tests (Andrew Chow)

Pull request description:

  Like the ledger test, but for bitbox.

  Also lets you specify the password for the device. This is currently only used for the bitbox.

Tree-SHA512: 04ee87cc9b176d151c1d0367c6dca6d03b9fc1087837185180cc9ba89f97b059ef29571d6c32fa2a445ca7ab1d738c1fc7f19c76aa421c97532fcb18c757b335
2019-01-11 14:12:55 -05:00
Andrew Chow
c54bc33381 Ensure that a bogus signature will always be created for ignored inputs
Fixes the issue where multisig inputs not belonging to the trezor
would cause an error. Also re-enables that test for the trezor
2019-01-11 13:44:43 -05:00
Gregory Sanders
0d6ad3a996 Test signtx with unknown inputs by wiping master fingerprint and processing 2019-01-10 22:13:48 -05:00
Andrew Chow
41d3faedfd Digital Bitbox manual tests 2019-01-09 13:09:06 -05:00
Andrew Chow
a834e13e18 Allow providing device passwords for manual tests 2019-01-09 13:06:40 -05:00
Andrew Chow
d8d74ac2dc Enable multisig tests for Trezor 2019-01-09 12:47:57 -05:00
Gregory Sanders
68a4935c88 multisig test
When device is marked as multi-sig enabled
create and spend 3 standard multisig types:

sh(wsh(multi()), sh(multi()), wsh(multi())
2019-01-09 11:15:22 -05:00
Gregory Sanders
dd5533f286 Adapt signing test to support devices that can't do mixed input signing 2019-01-08 14:19:37 -05:00
Andrew Chow
811f1ef99a
Merge #94: Send the full amount of funds in TestSignTx to test all input types
106c231 Send the full amount of funds in TestSignTx to test all input types (Gregory Sanders)

Pull request description:

  Also beef up the signing test a bit to try combinations of 1 to 3 inputs to catch corner cases in signing logic.

  I am writing a Ledger test and this case was not failing previously because it can handle legacy or witness, but not both.

Tree-SHA512: 815d620e9051c5f031cea2fd3ff4a9a36ada07e8903c906b92b802b72dd9a0c41cc23e471b1c1ca021a7457bdef10ae424971bc5cd08060151f9110d6e3b2de3
2019-01-08 12:15:13 -05:00
Gregory Sanders
106c23128b Send the full amount of funds in TestSignTx to test all input types 2019-01-08 10:29:55 -05:00
Andrew Chow
942969cfb7 Ensure RPC is available for each test case 2019-01-07 11:13:48 -05:00
Andrew Chow
14a1345ad1 Implement signmessage for the Coldcard with a simple test 2019-01-04 19:23:52 -05:00
Andrew Chow
775be00eed fix incorrect returns for errors and add tests for those errors 2018-12-26 14:11:33 -05:00
Andrew Chow
c661d487c2 Add generic testcase classes for each device to run 2018-12-24 15:57:17 -05:00