9bbf356c6b
* tests(rpc): add pending transaction filter test * tests(rpc): add block filter and event log test * tests(rpc): simplify to cluster instead of comparing types * tests(rpc): wip filter by address * tests(rpc): add get_logs test * fix flake8 linter * fix flake8 linter * add caching to readme * add caching to readme Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
55 lines
1.1 KiB
Markdown
55 lines
1.1 KiB
Markdown
# RPC Integration tests
|
|
|
|
The RPC integration test suite uses nix for reproducible and configurable
|
|
builds allowing to run integration tests using python web3 library against
|
|
different Ethermint and [Geth](https://github.com/ethereum/go-ethereum) clients with multiple configurations.
|
|
|
|
## Installation
|
|
|
|
Nix Multi-user installation:
|
|
|
|
```
|
|
sh <(curl -L https://nixos.org/nix/install) --daemon
|
|
```
|
|
|
|
Make sure the following line has been added to your shell profile (e.g. ~/.profile):
|
|
|
|
```
|
|
source ~/.nix-profile/etc/profile.d/nix.sh
|
|
```
|
|
|
|
Then re-login shell, the nix installation is completed.
|
|
|
|
For linux:
|
|
|
|
```
|
|
sh <(curl -L https://nixos.org/nix/install) --no-daemon
|
|
```
|
|
|
|
## Run Local
|
|
|
|
First time run (can take a while):
|
|
|
|
```
|
|
make run-integration-tests
|
|
```
|
|
|
|
Once you've run them once and, you can run:
|
|
|
|
```
|
|
nix-shell tests/integration_tests/shell.nix
|
|
cd tests/integration_tests
|
|
pytest -s -vv
|
|
```
|
|
|
|
If you're changing anything on the ethermint rpc, rerun the first command.
|
|
|
|
|
|
## Caching
|
|
|
|
You can enable Binary Cache to speed up the tests:
|
|
|
|
```
|
|
$ nix-env -iA cachix -f https://cachix.org/api/v1/install
|
|
$ cachix use ethermint
|
|
``` |