@@ -57,62 +57,44 @@ All the available commands include:
5757
5858- Build all crates: ` make build `
5959- Install the CLI: ` make install `
60- - Run tests: ` make test `
60+ - Run unit tests: ` make test `
6161- Run linter: ` make lint `
6262- Run formatter: ` make check-fmt `
6363- Run clippy: ` make check-clippy `
6464- Do all of the above: ` make all `
6565- Clean dependencies: ` make clean `
6666
67- ## Testing
67+ ## Integration Tests
6868
69- Some of the tests require a Docker container to be running for ` localnet ` , and so will fail if you run ` make test `
70- without starting the container first. You can start this container using the following command :
69+ The integration tests require a Docker container to be running for ` localnet ` . You can use the following Make commands
70+ to spin up a ` localnet ` Docker container and execute tests against it :
7171
72+ SDK integration tests:
7273``` bash
73- docker run --privileged --rm --name recall-localnet \
74- -p 8545:8545 \
75- -p 8645:8645 \
76- -p 26657:26657 \
77- textile/recall-localnet:latest
74+ make test-sdk
7875```
7976
80- If you'd like to test against a specific IPC commit, look for the corresponding ` localnet ` image in the
81- [ Docker Hub repository] ( https://hub.docker.com/r/textile/recall-localnet/tags ) using the first 7 characters of the IPC
82- commit hash. For example, for commit ` dc4da8c14c541e1ef9e398a594e65660465c47f5 ` , the corresponding ` localnet ` image
83- would be tagged ` sha-dc4da8c-* ` (in this case, ` sha-dc4da8c-3e80bf0 ` ). You can then run the following command:
84-
77+ CLI integration tests:
8578``` bash
86- docker run --privileged --rm -d --name recall-localnet \
87- -p 8545:8545 \
88- -p 8645:8645 \
89- -p 26657:26657 \
90- textile/recall-localnet:sha-dc4da8c-3e80bf0
91- ```
92-
93- Note that it can take several minutes for the ` localnet ` container to start up and be ready for testing. You can check
94- the status of the container using the following command:
95-
96- ``` text
97- docker logs -f recall-localnet
79+ make test-cli
9880```
9981
100- The following logs should appear when the container is ready:
101-
82+ If you want to run all tests, including unit tests and SDK/CLI integration tests, you can use the following command:
10283``` bash
103- All containers started. Waiting for termination signal...
84+ make test-all
10485```
10586
106- ### Extracting Network Config
87+ If you'd like to test against a specific IPC commit, look for the corresponding ` localnet ` image in the
88+ [ Docker Hub repository] ( https://hub.docker.com/r/textile/recall-localnet/tags ) using the first 7 characters of the IPC
89+ commit hash. For example, for commit ` dc4da8c14c541e1ef9e398a594e65660465c47f5 ` , the corresponding ` localnet ` image
90+ would be tagged ` sha-dc4da8c-* ` (in this case, ` sha-dc4da8c-3e80bf0 ` ).
10791
108- To extract the network config from the ` localnet ` container, you can run the following command:
92+ You can then specify the image tag in the Make command. For example :
10993
11094``` bash
111- docker exec -it recall-localnet bash -c " cat /workdir/localnet-data/networks.toml "
95+ RECALL_LOCALNET_IMAGE=textile/ recall-localnet:sha-dc4da8c-3e80bf1 make test-sdk
11296```
11397
114- Add the ` localnet ` configuration to your ` ~/.config/recall/networks.toml ` file.
115-
11698### Adding New Integration Tests
11799
118100All the tests in the repo are written as Rust unit tests, even the integration tests. New integration tests can be added
0 commit comments