uptest-sc / uptest

"curl" for substrate runtime upgrade testing
7 stars 6 forks source link

cargo test run all examples #61

Closed flipchan closed 1 year ago

flipchan commented 1 year ago

$ cargo test --examples -p uptest-examples

error[E0425]: cannot find function `to_bytes` in this scope
  --> examples/examples/get_pallets_test.rs:26:28
   |
26 |     let ext_bytes = &mut &*to_bytes(hexstring);
   |                            ^^^^^^^^ not found in this scope

error[E0433]: failed to resolve: use of undeclared crate or module `decoder`
  --> examples/examples/get_pallets_test.rs:29:9
   |
29 |         decoder::decode_extrinsic(&metadata, ext_bytes).expect("can decode extrinsic");
   |         ^^^^^^^ use of undeclared crate or module `decoder`

Some errors have detailed explanations: E0308, E0412, E0425, E0433.
For more information about an error, try `rustc --explain E0308`.
warning: `uptest-examples` (example "get_pallets_test" test) generated 2 warnings
error: could not compile `uptest-examples` (example "get_pallets_test" test) due to 8 previous errors; 2 warnings emitted
warning: build failed, waiting for other jobs to finish...
warning: `uptest-examples` (example "schedule_check" test) generated 2 warnings
warning: `uptest-examples` (example "get_block_events" test) generated 1 warning (run `cargo fix --example "get_block_events" --tests` to apply 1 suggestion)
flipchan commented 1 year ago

cargo build --release -p uptest-examples --examples ok