Skip to content

Commit

Permalink
fix durability not setting default
Browse files Browse the repository at this point in the history
  • Loading branch information
BlaineHeffron committed Jul 18, 2024
1 parent 0948120 commit aa76e40
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions cmd/crates/soroban-test/tests/it/integration/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,18 @@ async fn contract_data_read() {
.assert()
.success()
.stdout(predicates::str::starts_with("COUNTER,2"));

// ensure default durability = persistent works
sandbox
.new_assert_cmd("contract")
.arg("read")
.arg("--id")
.arg(id)
.arg("--key")
.arg(KEY)
.assert()
.success()
.stdout(predicates::str::starts_with("COUNTER,2"));
}

#[tokio::test]
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct Args {
)]
pub wasm_hash: Option<String>,
/// Storage entry durability
#[arg(long, value_enum, required = true, default_value = "persistent")]
#[arg(long, value_enum, default_value = "persistent")]
pub durability: Durability,
}

Expand Down

0 comments on commit aa76e40

Please sign in to comment.