Skip to content

Commit 695efa3

Browse files
committed
Use the default rust test runner
1 parent d2700de commit 695efa3

29 files changed

+277
-196
lines changed

e2e-tests/.idea/e2e-tests.iml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e-tests/.idea/inspectionProfiles/Project_Default.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e-tests/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e-tests/.idea/workspace.xml

Lines changed: 102 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e-tests/Cargo.lock

Lines changed: 29 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e-tests/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ codec = { package = 'parity-scale-codec', version = "3.0", default-features = fa
1515
rayon = "1.5"
1616
tokio = { version = "1.21.2", features = ["full"] }
1717
futures = "0.3.25"
18+
once_cell = "1.16"
1819

1920
sp-core = { git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28", default-features = false, features = ["full_crypto"] }
2021
sp-runtime = { git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28", default-features = false }

e2e-tests/src/ban.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use primitives::{SessionCount, SessionIndex};
1212
use sp_runtime::Perbill;
1313

1414
use crate::{
15-
accounts::account_ids_from_keys, elections::get_members_subset_for_session,
16-
validators::get_test_validators, Config,
15+
accounts::account_ids_from_keys, config::Config, elections::get_members_subset_for_session,
16+
validators::get_test_validators,
1717
};
1818

1919
const RESERVED_SEATS: u32 = 2;

e2e-tests/src/cases.rs

Lines changed: 0 additions & 90 deletions
This file was deleted.

e2e-tests/src/config.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1+
use std::env;
2+
13
use aleph_client::{RootConnection, SignedConnection};
24
use clap::{Args, Parser};
5+
use once_cell::sync::Lazy;
36
use primitives::SessionIndex;
47

58
use crate::accounts::{get_sudo_key, get_validators_keys, get_validators_seeds, NodeKeys};
69

10+
static GLOBAL_CONFIG: Lazy<Config> = Lazy::new(|| {
11+
let unparsed = env::var("E2E_CONFIG").unwrap_or("".to_string());
12+
let unparsed = format!("e2e {}", unparsed);
13+
Config::parse_from(unparsed.split_whitespace())
14+
});
15+
16+
pub fn config() -> &'static Config {
17+
&GLOBAL_CONFIG
18+
}
19+
720
#[derive(Debug, Parser, Clone)]
821
#[clap(version = "1.0")]
922
pub struct Config {

e2e-tests/src/lib.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
pub use cases::{run_all_testcases, run_testcase};
2-
pub use config::Config;
3-
1+
#[cfg(test)]
42
mod accounts;
3+
#[cfg(test)]
54
mod ban;
6-
mod cases;
5+
#[cfg(test)]
76
mod config;
7+
#[cfg(test)]
88
mod elections;
9+
#[cfg(test)]
910
mod rewards;
11+
#[cfg(test)]
1012
mod test;
13+
#[cfg(test)]
1114
mod transfer;
15+
#[cfg(test)]
1216
mod validators;

0 commit comments

Comments
 (0)