diff --git a/nomos-cluster-tests/Cargo.toml b/nomos-cluster-tests/Cargo.toml index 994fa023..c3b478c6 100644 --- a/nomos-cluster-tests/Cargo.toml +++ b/nomos-cluster-tests/Cargo.toml @@ -11,4 +11,5 @@ nomos-tracing = { path = "../nomos-tracing" } nomos-tracing-service = { path = "../nomos-services/tracing" } overwatch-rs = { git = "https://github.com/logos-co/Overwatch", rev = "2f70806" } color-eyre = "0.6.0" -tracing = "0.1" \ No newline at end of file +tracing = "0.1" +anyhow = "1.0.93" \ No newline at end of file diff --git a/nomos-cluster-tests/src/cluster.rs b/nomos-cluster-tests/src/cluster.rs new file mode 100644 index 00000000..65f8da97 --- /dev/null +++ b/nomos-cluster-tests/src/cluster.rs @@ -0,0 +1,8 @@ +use crate::node::NomosNode; + +pub trait Cluster { + fn members(&self) -> Vec>; + +} + + diff --git a/nomos-cluster-tests/src/lib.rs b/nomos-cluster-tests/src/lib.rs new file mode 100644 index 00000000..98e67a9b --- /dev/null +++ b/nomos-cluster-tests/src/lib.rs @@ -0,0 +1,10 @@ +mod cluster; +mod node; +pub mod config; +pub mod test_case; + +pub trait TestCase { + fn name(&self) -> &'static str; + fn run(&self) -> Result<(), anyhow::Error>; +} + diff --git a/nomos-cluster-tests/src/main.rs b/nomos-cluster-tests/src/main.rs index 57aa308e..3d20d4bb 100644 --- a/nomos-cluster-tests/src/main.rs +++ b/nomos-cluster-tests/src/main.rs @@ -1,6 +1,6 @@ -mod config; -use crate::config::{Config, LogArgs}; + +use nomos_cluster_tests::{config::{Config, LogArgs}, test_case::data_integrity_nodes_join_leave::DataIntegrityNodesJoinLeave, TestCase}; use clap::Parser; use color_eyre::eyre::Result; @@ -21,6 +21,8 @@ fn main() -> Result<()> { .update_from_args(log_args)?; // Run the test suite + let tc1 = DataIntegrityNodesJoinLeave {}; + println!("Running test: {}", tc1.name()); Ok(()) } diff --git a/nomos-cluster-tests/src/node.rs b/nomos-cluster-tests/src/node.rs new file mode 100644 index 00000000..34087f7b --- /dev/null +++ b/nomos-cluster-tests/src/node.rs @@ -0,0 +1,5 @@ + +pub trait NomosNode { + fn start(&self) -> String; + fn stop(&self) -> String; +} \ No newline at end of file diff --git a/nomos-cluster-tests/src/test_case/data_integrity_nodes_join_leave.rs b/nomos-cluster-tests/src/test_case/data_integrity_nodes_join_leave.rs new file mode 100644 index 00000000..500a461d --- /dev/null +++ b/nomos-cluster-tests/src/test_case/data_integrity_nodes_join_leave.rs @@ -0,0 +1,14 @@ +use anyhow::Error; +use crate::TestCase; + +pub struct DataIntegrityNodesJoinLeave; + +impl TestCase for DataIntegrityNodesJoinLeave { + fn name(&self) -> &'static str { + module_path!().split("::").last().unwrap() + } + + fn run(&self) -> Result<(), Error> { + todo!() + } +} \ No newline at end of file diff --git a/nomos-cluster-tests/src/test_case/mod.rs b/nomos-cluster-tests/src/test_case/mod.rs new file mode 100644 index 00000000..07b78d12 --- /dev/null +++ b/nomos-cluster-tests/src/test_case/mod.rs @@ -0,0 +1 @@ +pub mod data_integrity_nodes_join_leave; \ No newline at end of file