Skip to content

Commit

Permalink
fix: split tests to different hd_pahs
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Dec 16, 2024
1 parent c9456fe commit f2d8fe7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cmd/crates/soroban-test/tests/it/emulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ use soroban_cli::{

use test_case::test_case;

#[test_case("nanos"; "when the device is NanoS")]
#[test_case("nanox"; "when the device is NanoX")]
#[test_case("nanosp"; "when the device is NanoS Plus")]
#[test_case("nanos", 0; "when the device is NanoS")]
#[test_case("nanox", 1; "when the device is NanoX")]
#[test_case("nanosp", 2; "when the device is NanoS Plus")]
#[tokio::test]
async fn test_signer(ledger_device_model: &str) {
async fn test_signer(ledger_device_model: &str, hd_path: u32) {
let sandbox = Arc::new(TestEnv::new());
let container = TestEnv::speculos_container(ledger_device_model).await;
let host_port = container.get_host_port_ipv4(9998).await.unwrap();
let ui_host_port = container.get_host_port_ipv4(5000).await.unwrap();

let ledger = ledger(host_port).await;

let key = ledger.get_public_key(&0.into()).await.unwrap();
let key = ledger.get_public_key(&hd_path.into()).await.unwrap();

let verifying_key = ed25519_dalek::VerifyingKey::from_bytes(&key.0).unwrap();
let body: OperationBody =
Expand Down Expand Up @@ -56,6 +56,8 @@ async fn test_signer(ledger_device_model: &str) {
.new_assert_cmd("tx")
.arg("sign")
.arg("--sign-with-ledger")
.arg("--hd-path")
.arg(hd_path.to_string())
.write_stdin(tx_env.as_bytes())
.env("SPECULOS_PORT", host_port.to_string())
.env("RUST_LOGS", "trace")
Expand Down

0 comments on commit f2d8fe7

Please sign in to comment.