Skip to content

Commit

Permalink
fix: add event test
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Jan 31, 2024
1 parent 938adde commit 7efac5d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 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 @@ -19,6 +19,15 @@ async fn invoke() {
extend_contract(sandbox, id, HELLO_WORLD).await;
// Note that all functions tested here have no state
invoke_hello_world(sandbox, id);
sandbox
.new_assert_cmd("events")
.arg("--start-ledger=20")
.arg("--id")
.arg(id)
.assert()
.stdout(predicates::str::contains(id))
.success();

invoke_hello_world_with_lib(sandbox, id).await;
invoke_hello_world_with_lib_two(sandbox, id).await;
invoke_auth(sandbox, id);
Expand All @@ -39,6 +48,7 @@ fn invoke_hello_world(sandbox: &TestEnv, id: &str) {
sandbox
.new_assert_cmd("contract")
.arg("invoke")
.arg("--sign")
.arg("--id")
.arg(id)
.arg("--")
Expand Down
4 changes: 4 additions & 0 deletions docs/soroban-cli-full-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,10 @@ soroban contract invoke ... -- --help
Possible values: `true`, `false`

* `--instructions <INSTRUCTIONS>` — Number of instructions to simulate
* `--sign` — Sign and submit transaction regardless of whether it's a view function

Possible values: `true`, `false`

* `--rpc-url <RPC_URL>` — RPC server endpoint
* `--network-passphrase <NETWORK_PASSPHRASE>` — Network passphrase to sign the transaction sent to the rpc server
* `--network <NETWORK>` — Name of network to use from config
Expand Down

0 comments on commit 7efac5d

Please sign in to comment.