chore: basic traits for test case, cluster, node
This commit is contained in:
parent
8a9ee5e37f
commit
f247140f9b
|
@ -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"
|
||||
tracing = "0.1"
|
||||
anyhow = "1.0.93"
|
|
@ -0,0 +1,8 @@
|
|||
use crate::node::NomosNode;
|
||||
|
||||
pub trait Cluster {
|
||||
fn members(&self) -> Vec<Box<dyn NomosNode>>;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -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>;
|
||||
}
|
||||
|
|
@ -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(())
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
pub trait NomosNode {
|
||||
fn start(&self) -> String;
|
||||
fn stop(&self) -> String;
|
||||
}
|
|
@ -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!()
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
pub mod data_integrity_nodes_join_leave;
|
Loading…
Reference in New Issue