-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
speed up ui tests. #944
speed up ui tests. #944
Changes from 25 commits
02db651
7c5e091
2f4fc25
7b0c416
9414fd8
8a514ee
ed667dc
7119c69
b7f98ec
779f628
a466d4d
b937398
2d83019
5f4610e
605ed70
342030c
29d7e40
2990f3f
7bd4bfd
9e17507
fcf88b6
b07f015
82a5a21
0b7616a
a6f2a17
ae211fb
0076855
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# # Generates the 3 metadata files in `/artifacts` and the polkadot.rs file for integration tests | ||
# | ||
# This script is to be run from the root of the repository: `scripts/artifacts.sh` | ||
# | ||
# It expects a local polkadot node to be running a JSON-RPC HTTP server at 127.0.0.1:9933 | ||
# A local polkadot node can be run via: | ||
# ``` | ||
# git clone https://github.com/paritytech/polkadot.git | ||
# cd polkadot | ||
# cargo build --release | ||
# ./target/release/polkadot --dev --tmp | ||
# ``` | ||
|
||
# get the full metadata | ||
cargo run --bin subxt metadata --version unstable > artifacts/polkadot_metadata_full.scale | ||
# use it to generate polkadot.rs | ||
cargo run --bin subxt codegen --file artifacts/polkadot_metadata_full.scale | rustfmt > testing/integration-tests/src/codegen/polkadot.rs | ||
# generate a metadata file that only contains the pallets Balances, Staking, System and Multisig | ||
cargo run --bin subxt metadata --file artifacts/polkadot_metadata_full.scale --pallets "Balances,Staking,System,Multisig" > artifacts/polkadot_metadata_small.scale | ||
# generate a metadata file that only contains no pallets | ||
cargo run --bin subxt metadata --file artifacts/polkadot_metadata_full.scale --pallets "" > artifacts/polkadot_metadata_tiny.scale | ||
tadeohepperle marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
//! Using this macro looks something like: | ||
//! | ||
//! ```rust,no_run | ||
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] | ||
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: could use the tiny metadata here? |
||
//! pub mod polkadot {} | ||
//! ``` | ||
//! | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
//! ```rust,no_run | ||
//! use sp_keyring::AccountKeyring; | ||
//! | ||
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] | ||
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: could use the small metadata here? |
||
//! pub mod polkadot {} | ||
//! | ||
//! let constant_query = polkadot::constants().system().block_length(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
//! ```rust,no_run | ||
//! use sp_keyring::AccountKeyring; | ||
//! | ||
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] | ||
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: could use the tiny metadata here (I think)? |
||
//! pub mod polkadot {} | ||
//! | ||
//! let runtime_call = polkadot::apis().metadata().metadata_versions(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
//! ```rust,no_run | ||
//! use sp_keyring::AccountKeyring; | ||
//! | ||
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] | ||
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: could use the small metadata here? |
||
//! pub mod polkadot {} | ||
//! | ||
//! let account = AccountKeyring::Alice.to_account_id().into(); | ||
|
@@ -45,7 +45,7 @@ | |
//! ```rust,no_run | ||
//! use sp_keyring::AccountKeyring; | ||
//! | ||
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata.scale")] | ||
//! #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: could use the small metadata here? |
||
//! pub mod polkadot {} | ||
//! | ||
//! // A static query capable of iterating over accounts: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The server running on port 9933 is removed