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

Node tests crate #6972

Merged
merged 6 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ members = [
"crates/node-optimism/",
"crates/node-core/",
"crates/node-api/",
"crates/node-tests/",
"crates/node-e2e-tests/",
"crates/stages/",
"crates/static-file/",
"crates/storage/codecs/",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "node-tests"
name = "node-e2e-tests"
version = "0.0.0"
publish = false
edition.workspace = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use reth_node_ethereum::EthereumNode;
use reth_primitives::{b256, hex, ChainSpec, Genesis};
use std::sync::Arc;

#[tokio::main]
async fn main() -> eyre::Result<()> {
#[tokio::test]
async fn can_run_dev_node() {
let tasks = TaskManager::current();

// create node config
Expand All @@ -24,11 +24,12 @@ async fn main() -> eyre::Result<()> {
.testing_node(tasks.executor())
.node(EthereumNode::default())
.launch()
.await?;
.await
.unwrap();

assert_chain_advances(node).await;

node_exit_future.await
node_exit_future.await.unwrap();
loocapro marked this conversation as resolved.
Show resolved Hide resolved
}

async fn assert_chain_advances<Node: FullNodeComponents>(mut node: FullNode<Node>) {
Expand Down
3 changes: 3 additions & 0 deletions crates/node-e2e-tests/dev/it/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mod dev;

fn main() {}
Loading