Skip to content

Commit

Permalink
feat: add --yes to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Jun 19, 2024
1 parent bf6bbe4 commit e534c6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/crates/soroban-test/tests/it/integration/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down Expand Up @@ -279,6 +283,7 @@ async fn contract_data_read() {
.arg("invoke")
.arg("--id")
.arg(id)
.arg("--yes")
.arg("--")
.arg("inc")
.assert()
Expand Down Expand Up @@ -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\"]");
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions cmd/crates/soroban-test/tests/it/integration/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -93,6 +94,7 @@ pub async fn extend(sandbox: &TestEnv, id: &str, value: Option<&str>) {
id,
"--durability",
"persistent",
"--yes",
"--ledgers-to-extend",
"100000",
];
Expand Down

0 comments on commit e534c6e

Please sign in to comment.