Skip to content
Snippets Groups Projects
Unverified Commit bbb4c3b3 authored by bgallois's avatar bgallois
Browse files

upgrade cucumber

parent 2cad8546
No related branches found
No related tags found
No related merge requests found
Pipeline #35816 failed
This commit is part of merge request !236. Comments created here will be created in the context of that merge request.
This diff is collapsed.
......@@ -9,24 +9,23 @@ repository = 'https://git.duniter.org/nodes/rust/duniter-v2s'
version = '3.0.0'
[dev-dependencies]
anyhow = "1.0"
async-trait = "0.1.74"
clap = { version = "3.2.23", features = ["derive", "cargo"] } # end2end cli refactoring need to upgrade to 4
ctrlc = "3.2.2"
cucumber = "0.11"
anyhow = "1.0.79"
clap = { version = "4.4.18", features = ["derive", "cargo"] }
ctrlc = "3.4.2"
cucumber = { version = "0.20.2", features = ["macros"] }
distance-oracle = { path = "../distance-oracle", default_features = false }
env_logger = "0.9.0"
env_logger = "0.11.1"
hex = "0.4.3"
notify = "4.0"
parity-scale-codec = "3.4.0"
notify = "4.0.17"
parity-scale-codec = "3.6.9"
portpicker = "0.1.1"
serde_json = "1.0.96"
serde_json = "1.0.113"
sp-core = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false }
sp-core-hashing = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false }
sp-runtime = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0" }
sp-keyring = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0" }
subxt = { git = 'https://github.com/duniter/subxt', branch = 'subxt-v0.34.0-duniter-substrate-v1.6.0', default-features = false, features = ["substrate-compat", "native", "jsonrpsee"] }
tokio = { version = "1.28", features = ["macros", "time", "rt-multi-thread"], default-features = false }
tokio = { version = "1.36.0", features = ["macros", "time", "rt-multi-thread"], default-features = false }
[[test]]
name = "cucumber_tests"
......
......@@ -16,11 +16,10 @@
mod common;
use async_trait::async_trait;
use common::*;
use cucumber::{given, then, when, FailureWriter, World, WorldInit};
use cucumber::StatsWriter;
use cucumber::{given, then, when, World};
use sp_keyring::AccountKeyring;
use std::convert::Infallible;
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::{
......@@ -31,7 +30,7 @@ use subxt::backend::rpc::RpcClient;
// ===== world =====
#[derive(WorldInit)]
#[derive(cucumber::World, Default)]
pub struct DuniterWorld {
ignore_errors: bool,
inner: Option<DuniterWorldInner>,
......@@ -130,19 +129,6 @@ impl std::fmt::Debug for DuniterWorld {
}
}
#[async_trait(?Send)]
impl World for DuniterWorld {
// We do require some error type.
type Error = Infallible;
async fn new() -> std::result::Result<Self, Infallible> {
Ok(Self {
ignore_errors: false,
inner: None,
})
}
}
struct DuniterWorldInner {
client: FullClient,
process: Option<Process>,
......@@ -594,19 +580,19 @@ async fn identity_status_should_be(
#[derive(clap::Args)]
struct CustomOpts {
/// Keep running
#[clap(short, long)]
#[arg(short, long)]
keep_running: bool,
/// Do not spawn a node, reuse expected node on port 9944
#[clap(long)]
#[arg(long)]
no_spawn: bool,
/// For compliance with Jetbrains IDE which pushes extra args.
/// https://youtrack.jetbrains.com/issue/CPP-33071/cargo-test-adds-extra-options-which-conflict-with-Cucumber
#[clap(short, long)]
#[arg(short, long)]
format: Option<String>,
#[clap(short, long = "show-output")]
#[arg(short, long = "show-output")]
show_output: bool,
#[clap(short = 'Z', long)]
#[arg(short = 'Z', long)]
z: Option<String>,
}
......@@ -650,7 +636,7 @@ async fn main() {
world.set_ignore_errors(ignore_errors(&scenario.tags));
Box::pin(world.init(Some(genesis_conf_file_path), no_spawn))
})
.after(move |_feature, _rule, _scenario, maybe_world| {
.after(move |_feature, _rule, _scenario, _ev, maybe_world| {
if keep_running {
while running.load(Ordering::SeqCst) {}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment