Skip to content

Commit

Permalink
Remove test_setup_device and add test_setup_trezor_device
Browse files Browse the repository at this point in the history
  • Loading branch information
yukibtc committed Nov 16, 2022
1 parent c1b9997 commit 4e97c40
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ mod tests {
break;
}
}

#[test]
#[serial]
fn test_get_version() {
Expand All @@ -328,18 +328,12 @@ mod tests {
#[test]
#[serial]
#[ignore]
fn test_setup_device() {
let devices = HWIClient::enumerate().unwrap();
let unsupported = ["ledger", "coldcard", "jade"];
for device in devices {
let device = device.unwrap();
if unsupported.contains(&device.device_type.as_str()) {
// These devices don't support setup
continue;
}
let client = HWIClient::get_client(&device, true, types::HWIChain::Test).unwrap();
client.setup_device(Some("My Label"), None).unwrap();
}
// At the moment (hwi v2.1.1 and trezor-firmware core v2.5.2) work only with physical devices and NOT emulators!
fn test_setup_trezor_device() {
let client =
HWIClient::find_device(None, Some("trezor"), None, false, types::HWIChain::Test)
.unwrap();
client.setup_device(Some("My Label"), None).unwrap();
}

#[test]
Expand Down

0 comments on commit 4e97c40

Please sign in to comment.