Skip to content

Commit

Permalink
Fix UI Tests (paritytech#7722)
Browse files Browse the repository at this point in the history
* Fix UI tests

* make updates.

* Revert "make updates."

This reverts commit 3f41979.

* Try to fix companion build

* Use some depth

* tests: fix UI tests on the latest nightly

* tests: fix polkadot companion test, depth

* chore: update deps

* chore: update deps

* chore: sp-io

Co-authored-by: kianenigma <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Denis P <[email protected]>
  • Loading branch information
4 people authored and darkfriend77 committed Jan 11, 2021
1 parent c607d66 commit 3a32af2
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .maintain/gitlab/check_polkadot_companion_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cargo install -f --version 0.2.0 diener

# Merge master into our branch before building Polkadot to make sure we don't miss
# any commits that are required by Polkadot.
git fetch --depth 20 origin
git fetch --depth 100 origin
git merge origin/master

# Clone the current Polkadot master branch into ./polkadot.
Expand Down
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bin/node/browser-testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ libp2p = { version = "0.32.2", default-features = false }
jsonrpc-core = "15.0.0"
serde = "1.0.106"
serde_json = "1.0.48"
wasm-bindgen = { version = "=0.2.68", features = ["serde-serialize"] }
wasm-bindgen = { version = "=0.2.69", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.18"
wasm-bindgen-test = "0.3.18"
futures = "0.3.4"
Expand Down
6 changes: 3 additions & 3 deletions frame/support/test/tests/derive_no_bound_ui/clone.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error[E0277]: the trait bound `<T as Config>::C: std::clone::Clone` is not satisfied
error[E0277]: the trait bound `<T as Config>::C: Clone` is not satisfied
--> $DIR/clone.rs:7:2
|
7 | c: T::C,
| ^ the trait `std::clone::Clone` is not implemented for `<T as Config>::C`
| ^ the trait `Clone` is not implemented for `<T as Config>::C`
|
= note: required by `std::clone::Clone::clone`
= note: required by `clone`
2 changes: 1 addition & 1 deletion frame/support/test/tests/derive_no_bound_ui/eq.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ error[E0277]: can't compare `Foo<T>` with `Foo<T>`
6 | struct Foo<T: Config> {
| ^^^ no implementation for `Foo<T> == Foo<T>`
|
= help: the trait `std::cmp::PartialEq` is not implemented for `Foo<T>`
= help: the trait `PartialEq` is not implemented for `Foo<T>`
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
17 | sp_api::impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found struct `std::string::String`
|
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<std::string::String>, std::vec::Vec<_>) -> std::result::Result<_, _>`
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<std::string::String>, Vec<_>) -> std::result::Result<_, _>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
Expand Down
14 changes: 7 additions & 7 deletions primitives/api/test/tests/ui/mock_only_one_error_type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ error: First error type was declared here.
17 | type Error = u32;
| ^^^

error[E0277]: the trait bound `u32: std::convert::From<sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ApiError>` is not satisfied
error[E0277]: the trait bound `u32: From<sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ApiError>` is not satisfied
--> $DIR/mock_only_one_error_type.rs:17:16
|
17 | type Error = u32;
| ^^^ the trait `std::convert::From<sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ApiError>` is not implemented for `u32`
| ^^^ the trait `From<sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ApiError>` is not implemented for `u32`
|
::: $WORKSPACE/primitives/api/src/lib.rs
|
| type Error: std::fmt::Debug + From<ApiError>;
| -------------- required by this bound in `sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ApiErrorExt`
| -------------- required by this bound in `ApiErrorExt`
|
= help: the following implementations were found:
<u32 as std::convert::From<bool>>
<u32 as std::convert::From<char>>
<u32 as std::convert::From<h2::frame::reason::Reason>>
<u32 as std::convert::From<h2::frame::reason::Reason>>
<u32 as From<HttpError>>
<u32 as From<HttpRequestId>>
<u32 as From<HttpRequestStatus>>
<u32 as From<Ipv4Addr>>
and 18 others
8 changes: 4 additions & 4 deletions primitives/api/test/tests/ui/mock_only_self_reference.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
12 | sp_api::mock_impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `()`
|
= note: expected fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<()>, std::vec::Vec<_>) -> std::result::Result<_, _>`
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> std::result::Result<_, _>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0053]: method `Api_test2_runtime_api_impl` has an incompatible type for trait
Expand All @@ -42,6 +42,6 @@ error[E0053]: method `Api_test2_runtime_api_impl` has an incompatible type for t
12 | sp_api::mock_impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `()`
|
= note: expected fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<()>, std::vec::Vec<_>) -> std::result::Result<_, _>`
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> std::result::Result<_, _>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
17 | sp_api::impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `&u64`
|
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<&u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> std::result::Result<_, _>`
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<&u64>, Vec<_>) -> std::result::Result<_, _>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
Expand Down

0 comments on commit 3a32af2

Please sign in to comment.