mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-28 06:07:58 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3138ff67a1 | |||
| c30c2277fd | |||
| 4ff81e5452 | |||
| e2795cd5cd | |||
| 4d2759dc9a | |||
| 7c978586e1 | |||
| 1081c569e8 | |||
| a1ad9f2f95 | |||
| d71b39dbfb | |||
| 7c4dc3568e | |||
| 50e1f0ccdf |
@@ -25,4 +25,3 @@ sp-runtime = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
temp-dir = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
|
||||
@@ -166,7 +166,6 @@ impl KitchensinkNode {
|
||||
.clone()
|
||||
.open(self.kitchensink_stderr_log_file_path())?;
|
||||
self.process_substrate = Command::new(&self.substrate_binary)
|
||||
.arg("--dev")
|
||||
.arg("--chain")
|
||||
.arg(chainspec_path)
|
||||
.arg("--base-path")
|
||||
@@ -918,14 +917,13 @@ impl BlockHeader for KitchenSinkHeader {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use alloy::rpc::types::TransactionRequest;
|
||||
use revive_dt_config::Arguments;
|
||||
use std::path::PathBuf;
|
||||
use temp_dir::TempDir;
|
||||
|
||||
use std::fs;
|
||||
|
||||
use super::*;
|
||||
use super::KitchensinkNode;
|
||||
use crate::{GENESIS_JSON, Node};
|
||||
|
||||
fn test_config() -> (Arguments, TempDir) {
|
||||
@@ -940,37 +938,6 @@ mod tests {
|
||||
(config, temp_dir)
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn node_mines_simple_transfer_transaction_and_returns_receipt() {
|
||||
// Arrange
|
||||
let (args, _temp_dir) = test_config();
|
||||
let mut node = KitchensinkNode::new(&args);
|
||||
node.spawn(GENESIS_JSON.to_owned())
|
||||
.expect("Failed to spawn the node");
|
||||
|
||||
let provider = ProviderBuilder::new()
|
||||
.network::<KitchenSinkNetwork>()
|
||||
.wallet(args.wallet())
|
||||
.connect(&node.rpc_url)
|
||||
.await
|
||||
.expect("Failed to create provider");
|
||||
|
||||
let account_address = args.wallet().default_signer().address();
|
||||
let transaction = TransactionRequest::default()
|
||||
.to(account_address)
|
||||
.value(U256::from(100_000_000_000_000u128));
|
||||
|
||||
// Act
|
||||
let receipt = provider.send_transaction(transaction).await;
|
||||
|
||||
// Assert
|
||||
let _ = receipt
|
||||
.expect("Failed to send the transfer transaction")
|
||||
.get_receipt()
|
||||
.await
|
||||
.expect("Failed to get the receipt for the transfer");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_init_generates_chainspec_with_balances() {
|
||||
let genesis_content = r#"
|
||||
|
||||
Reference in New Issue
Block a user