laconicd-deprecated/tests/integration_tests
Tomas Guerra ecd76396eb
tests(filters): add/improve integration tests for JSON-RPC methods (#1480)
* tests(filters) add block hash check on newBlock filter

* tests(filters) add getLogs test cases

* tests(filters) add eth_newFilter multiple filters test cases

* tests(filters) add eth_newFilter and eth_eth_uninstallFilter test case

* tests(filters) fix linting errors

* tests(filters) fix linting error on imports

* tests(filters) add test case: register filter before contract deploy

* tests(filters) refactor logs topics assertion

* tests(filters) add topics filter test cases

* tests(filters) fix linting errors

* tests(filters) remove unnecessary package.json file

* tests(filters) update based on PR comments

* tests(filters) separate getNewBlocks failing test to a separate PR

* tests(filters) add retry on send_tx to avoid Timeout error

* tests(filters) add logs by topic and block range test case

* update gomod2nix

* tests(filters) remove test elapsed time log

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Freddy Caceres <facs95@gmail.com>
2022-11-30 13:46:49 +00:00
..
configs imp: reduce integration test block time to 2s (#1428) 2022-11-02 18:37:23 -04:00
hardhat tests(filters): add/improve integration tests for JSON-RPC methods (#1480) 2022-11-30 13:46:49 +00:00
__init__.py imp(tests): integration tests setup (#1196) 2022-07-27 13:27:07 +00:00
.isort.cfg imp(tests): prune node integration tests (#1212) 2022-08-08 10:17:10 +02:00
conftest.py tests(websocket): websocket integration tests (#1355) 2022-10-28 08:10:11 +00:00
cosmoscli.py fix: chain-id in grpc query is not initialized without abci event (#1405) 2022-11-18 13:19:09 -05:00
expected_constants.py chore (deps): Update geth version to v1.10.25 (#1413) 2022-11-16 12:59:12 -05:00
network.py fix(rpc): fix gRPC query failure on legacy blocks (#1354) 2022-09-23 18:06:25 +02:00
poetry.lock fix: build test on mac by updating to python3.10 (#1437) 2022-11-09 13:46:40 +01:00
pyproject.toml fix: build test on mac by updating to python3.10 (#1437) 2022-11-09 13:46:40 +01:00
README.md tests(rpc): add filter tests (#1233) 2022-08-12 13:57:57 +00:00
shell.nix fix: integration tests are not run in CI (#1221) 2022-08-02 08:21:03 +02:00
test_account.py fix: align empty account result for old blocks as ethereum (#1484) 2022-11-25 08:26:03 +01:00
test_basic.py fix: integration tests are not run in CI (#1221) 2022-08-02 08:21:03 +02:00
test_filters.py tests(filters): add/improve integration tests for JSON-RPC methods (#1480) 2022-11-30 13:46:49 +00:00
test_gas.py tests: add additional gas consumption tests (#1477) 2022-11-18 20:08:05 -05:00
test_grpc_only.py fix: chain-id in grpc query is not initialized without abci event (#1405) 2022-11-18 13:19:09 -05:00
test_priority.py fix: unstable tx_priority test (#1440) 2022-11-10 13:06:14 +00:00
test_pruned_node.py chore (deps): Update geth version to v1.10.25 (#1413) 2022-11-16 12:59:12 -05:00
test_rollback.py test: add integration test for the rollback cmd (#1311) 2022-09-01 16:22:25 +02:00
test_tracers.py chore (deps): Update geth version to v1.10.25 (#1413) 2022-11-16 12:59:12 -05:00
test_types.py chore (deps): Update geth version to v1.10.25 (#1413) 2022-11-16 12:59:12 -05:00
test_upgrade.py chore (deps): Update geth version to v1.10.25 (#1413) 2022-11-16 12:59:12 -05:00
test_websockets.py tests(websocket): websocket integration tests (#1355) 2022-10-28 08:10:11 +00:00
utils.py tests(filters): add/improve integration tests for JSON-RPC methods (#1480) 2022-11-30 13:46:49 +00:00

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 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