mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 18:41:05 +00:00
Add proper test Custom values (#1147)
* add proper tests for custom values * remove try operators * use sustrate compat for import of hash * add license and hex * add script to artifacts.sh * custom values with ids not in metadata can be accessed in static interface * fmt and clippy * access bytes of custom values directly, even if type id wrong * final fixes * removing substrate-compat flag from ui tests * Update subxt/src/custom_values/custom_values_client.rs Co-authored-by: James Wilson <james@jsdw.me> * remove types access in type generator * 2 extra lines --------- Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
//! Use with `TRYBUILD=overwrite` after updating codebase (see `trybuild` docs for more details on that)
|
||||
//! to automatically regenerate `stderr` files, but don't forget to check that new files make sense.
|
||||
|
||||
mod custom_values;
|
||||
mod dispatch_errors;
|
||||
mod storage;
|
||||
mod utils;
|
||||
@@ -21,13 +20,13 @@ use crate::utils::MetadataTestRunner;
|
||||
// Each of these tests leads to some rust code being compiled and
|
||||
// executed to test that compilation is successful (or errors in the
|
||||
// way that we'd expect).
|
||||
|
||||
#[test]
|
||||
fn ui_tests() {
|
||||
let mut m = MetadataTestRunner::default();
|
||||
let t = trybuild::TestCases::new();
|
||||
|
||||
t.pass("src/correct/*.rs");
|
||||
|
||||
// Check that storage maps with no keys are handled properly.
|
||||
t.pass(
|
||||
m.new_test_case()
|
||||
@@ -52,12 +51,6 @@ fn ui_tests() {
|
||||
.build(dispatch_errors::metadata_array_dispatch_error()),
|
||||
);
|
||||
|
||||
t.pass(
|
||||
m.new_test_case()
|
||||
.name("custom_values_foo")
|
||||
.build(custom_values::metadata_custom_values_foo()),
|
||||
);
|
||||
|
||||
// Test retaining only specific pallets and ensure that works.
|
||||
for pallet in ["Babe", "Claims", "Grandpa", "Balances"] {
|
||||
let mut metadata = MetadataTestRunner::load_metadata();
|
||||
|
||||
Reference in New Issue
Block a user