From 4e97c406f5c43f32ef8268a3d120ea2f044f0c87 Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Wed, 16 Nov 2022 12:18:47 +0100 Subject: [PATCH] Remove test_setup_device and add test_setup_trezor_device --- src/lib.rs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index be01f09..42af701 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -318,7 +318,7 @@ mod tests { break; } } - + #[test] #[serial] fn test_get_version() { @@ -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]