mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-22 16:08:00 +00:00
2f1b67b384
* factor out node starting thing to separate crate to use in test-runtime and integration-tests * remove subxt dep on test-runtime build, and clippy tidyup * remove now-unneeded dep * Update testing/substrate-runner/Cargo.toml Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> * Update testing/integration-tests/Cargo.toml Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> * remove unneeded port things for backward compat --------- Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
test-runtime
The logic for this crate exists mainly in the build.rs file.
At compile time, this crate will:
- Spin up a local
substratebinary (set theSUBSTRATE_NODE_PATHenv var to point to a custom binary, otherwise it'll look forsubstrateon your PATH). - Obtain metadata from this node.
- Export the metadata and a
node_runtimemodule which has been annotated using thesubxtproc macro and is based off the above metadata.
The reason for doing this is that our integration tests (which also spin up a Substrate node) can then use the generated subxt types from the exact node being tested against, so that we don't have to worry about metadata getting out of sync with the binary under test.