Skip to content
Snippets Groups Projects

Custom genesis for end2end tests & cucumber binary in docker

Merged Éloïs requested to merge elois-custom-genesis-for-end2end-tests into master
2 files
+ 7
9
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -122,7 +122,7 @@ async fn who_have(world: &mut DuniterWorld, who: String, amount: u64, unit: Stri
}
// Create {amount} ĞD for {who}
common::balances::set_balance(&world.api(), &world.client(), who, amount).await?;
common::balances::set_balance(world.api(), world.client(), who, amount).await?;
Ok(())
}
@@ -130,7 +130,7 @@ async fn who_have(world: &mut DuniterWorld, who: String, amount: u64, unit: Stri
#[when(regex = r"(\d+) blocks? later")]
async fn n_blocks_later(world: &mut DuniterWorld, n: usize) -> Result<()> {
for _ in 0..n {
common::create_empty_block(&world.client()).await?;
common::create_empty_block(world.client()).await?;
}
Ok(())
}
@@ -149,9 +149,9 @@ async fn transfer(
let (amount, is_ud) = parse_amount(amount, &unit);
if is_ud {
common::balances::transfer_ud(&world.api(), &world.client(), from, amount, to).await
common::balances::transfer_ud(world.api(), world.client(), from, amount, to).await
} else {
common::balances::transfer(&world.api(), &world.client(), from, amount, to).await
common::balances::transfer(world.api(), world.client(), from, amount, to).await
}
}
@@ -161,7 +161,7 @@ async fn send_all_to(world: &mut DuniterWorld, from: String, to: String) -> Resu
let from = AccountKeyring::from_str(&from).expect("unknown from");
let to = AccountKeyring::from_str(&to).expect("unknown to");
common::balances::transfer_all(&world.api(), &world.client(), from, to).await
common::balances::transfer_all(world.api(), world.client(), from, to).await
}
#[then(regex = r"([a-zA-Z]+) should have (\d+) ĞD")]
Loading