From e534c6e3ed18d658389ddd6533b65573924c115c Mon Sep 17 00:00:00 2001 From: Willem Wyndham Date: Wed, 19 Jun 2024 17:32:02 -0400 Subject: [PATCH] feat: add `--yes` to tests --- .../soroban-test/tests/it/integration/hello_world.rs | 8 +++++++- cmd/crates/soroban-test/tests/it/integration/util.rs | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/crates/soroban-test/tests/it/integration/hello_world.rs b/cmd/crates/soroban-test/tests/it/integration/hello_world.rs index ac4d59476..b6de123b5 100644 --- a/cmd/crates/soroban-test/tests/it/integration/hello_world.rs +++ b/cmd/crates/soroban-test/tests/it/integration/hello_world.rs @@ -147,6 +147,7 @@ fn invoke_hello_world(sandbox: &TestEnv, id: &str) { .arg("--is-view") .arg("--id") .arg(id) + .arg("--yes") .arg("--") .arg("hello") .arg("--world=world") @@ -175,6 +176,7 @@ fn invoke_auth(sandbox: &TestEnv, id: &str, addr: &str) { .arg("invoke") .arg("--id") .arg(id) + .arg("--yes") .arg("--") .arg("auth") .arg("--addr=test") @@ -189,6 +191,7 @@ fn invoke_auth(sandbox: &TestEnv, id: &str, addr: &str) { .arg("invoke") .arg("--id") .arg(id) + .arg("--yes") .arg("--") .arg("auth") .arg("--addr=test") @@ -206,6 +209,7 @@ fn invoke_auth_with_identity(sandbox: &TestEnv, id: &str, key: &str, addr: &str) .arg(key) .arg("--id") .arg(id) + .arg("--yes") .arg("--") .arg("auth") .arg("--addr") @@ -279,6 +283,7 @@ async fn contract_data_read() { .arg("invoke") .arg("--id") .arg(id) + .arg("--yes") .arg("--") .arg("inc") .assert() @@ -331,7 +336,7 @@ async fn invoke_with_id(sandbox: &TestEnv, id: &str) { async fn invoke_with_source(sandbox: &TestEnv, source: &str, id: &str) { let cmd = sandbox - .invoke_with(&["--id", id, "--", "hello", "--world=world"], source) + .invoke_with(&["--id", id, "--yes", "--", "hello", "--world=world"], source) .await .unwrap(); assert_eq!(cmd, "[\"Hello\",\"world\"]"); @@ -365,6 +370,7 @@ async fn invoke_prng_u64_in_range_test(sandbox: &TestEnv, id: &str) { .invoke_with_test(&[ "--id", id, + "--yes", "--", "prng_u64_in_range", "--low=0", diff --git a/cmd/crates/soroban-test/tests/it/integration/util.rs b/cmd/crates/soroban-test/tests/it/integration/util.rs index c7f348e20..e18b04982 100644 --- a/cmd/crates/soroban-test/tests/it/integration/util.rs +++ b/cmd/crates/soroban-test/tests/it/integration/util.rs @@ -63,6 +63,7 @@ pub async fn deploy_contract( let cmd = sandbox.cmd_with_config::<_, commands::contract::deploy::wasm::Cmd>(&[ "--fee", "1000000", + "--yes", "--wasm", &wasm.path().to_string_lossy(), "--salt", @@ -93,6 +94,7 @@ pub async fn extend(sandbox: &TestEnv, id: &str, value: Option<&str>) { id, "--durability", "persistent", + "--yes", "--ledgers-to-extend", "100000", ];