Skip to content
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

Remove substrate_test_utils::test #1321

Merged
merged 4 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ members = [
"substrate/test-utils",
"substrate/test-utils/cli",
"substrate/test-utils/client",
"substrate/test-utils/derive",
"substrate/test-utils/runtime",
"substrate/test-utils/runtime/client",
"substrate/test-utils/runtime/transaction-pool",
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/metrics/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use std::collections::HashMap;

const DEFAULT_PROMETHEUS_PORT: u16 = 9616;

#[substrate_test_utils::test(flavor = "multi_thread")]
#[tokio::test(flavor = "multi_thread")]
async fn runtime_can_publish_metrics() {
let mut alice_config =
node_config(|| {}, tokio::runtime::Handle::current(), Alice, Vec::new(), true);
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/test/service/tests/build-blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use futures::{future, pin_mut, select, FutureExt};
use polkadot_test_service::*;
use sp_keyring::Sr25519Keyring;

#[substrate_test_utils::test(flavor = "multi_thread")]
#[tokio::test(flavor = "multi_thread")]
async fn ensure_test_service_build_blocks() {
let mut builder = sc_cli::LoggerBuilder::new("");
builder.with_colors(false);
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/test/service/tests/call-function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use polkadot_test_service::*;
use sp_keyring::Sr25519Keyring::{Alice, Bob, Charlie};

#[substrate_test_utils::test(flavor = "multi_thread")]
#[tokio::test(flavor = "multi_thread")]
async fn call_function_actually_work() {
let alice_config =
node_config(|| {}, tokio::runtime::Handle::current(), Alice, Vec::new(), true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const PUPPET_EXE: &str = env!("CARGO_BIN_EXE_adder_collator_puppet_worker");
// If this test is failing, make sure to run all tests with the `real-overseer` feature being
// enabled.

#[substrate_test_utils::test(flavor = "multi_thread")]
#[tokio::test(flavor = "multi_thread")]
async fn collating_using_adder_collator() {
use polkadot_primitives::Id as ParaId;
use sp_keyring::AccountKeyring::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const PUPPET_EXE: &str = env!("CARGO_BIN_EXE_undying_collator_puppet_worker");

// If this test is failing, make sure to run all tests with the `real-overseer` feature being
// enabled.
#[substrate_test_utils::test(flavor = "multi_thread")]
#[tokio::test(flavor = "multi_thread")]
async fn collating_using_undying_collator() {
use polkadot_primitives::Id as ParaId;
use sp_keyring::AccountKeyring::*;
Expand Down
1 change: 0 additions & 1 deletion substrate/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
futures = "0.3.16"
tokio = { version = "1.22.0", features = ["macros", "time"] }
substrate-test-utils-derive = { path = "derive" }

[dev-dependencies]
trybuild = { version = "1.0.74", features = [ "diff" ] }
Expand Down
19 changes: 0 additions & 19 deletions substrate/test-utils/derive/Cargo.toml

This file was deleted.

73 changes: 0 additions & 73 deletions substrate/test-utils/derive/src/lib.rs

This file was deleted.

20 changes: 0 additions & 20 deletions substrate/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,6 @@

//! Test utils

#[doc(hidden)]
pub use futures;
/// Marks async function to be executed by an async runtime suitable to test environment.
///
/// # Requirements
///
/// You must have tokio in the `[dev-dependencies]` of your crate to use this macro.
///
/// # Example
///
/// ```
/// #[substrate_test_utils::test]
/// async fn basic_test() {
/// assert!(true);
/// }
/// ```
pub use substrate_test_utils_derive::test;
#[doc(hidden)]
pub use tokio;

/// Panic when the vectors are different, without taking the order into account.
///
/// # Examples
Expand Down
49 changes: 0 additions & 49 deletions substrate/test-utils/tests/basic.rs

This file was deleted.

23 changes: 0 additions & 23 deletions substrate/test-utils/tests/ui.rs

This file was deleted.

24 changes: 0 additions & 24 deletions substrate/test-utils/tests/ui/too-many-func-parameters.rs

This file was deleted.

5 changes: 0 additions & 5 deletions substrate/test-utils/tests/ui/too-many-func-parameters.stderr

This file was deleted.