Skip to content

Commit

Permalink
Fix test steps #1104 (#1208)
Browse files Browse the repository at this point in the history
It's necessary to build Contract A before running the test, otherwise Contract A cannot be called from Contract B.
  • Loading branch information
carstenjacobsen authored Jan 21, 2025
1 parent 3ce88fa commit c1427d1
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,17 @@ git clone -b v22.0.1 https://github.com/stellar/soroban-examples

Or, skip the development environment setup and open this example in [Gitpod][oigp].

To run the tests for the example, navigate to the `cross_contract/contract_b` directory, and use `cargo test`.
To run the tests for the example, first build Contract A (the contract to be called) and then run `cargo test` from Contract B's directory. Build Contract A by navigating to the `cross_contract/contract_a` directory and use the `stellar contract build` build command:

```
cd cross_contract/contract_b
cd cross_contract/contract_a
stellar contract build
```

When Contract A has been built, navigate to the `cross_contract/contract_b` directory, and use `cargo test`.

```
cd ../contract_b
cargo test
```

Expand Down

0 comments on commit c1427d1

Please sign in to comment.