mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-02-16 19:23:09 +00:00
This merge brings the following updates from the dev branch: Pull Requests: - #10: chore: update main repo dependencies (@hansieodendaal) Update for main repo changes including removal of DA config-related code and executor node dependencies - #8: Add support to use framework without running scenario (@andrussal) Add ManualCluster for controlling nodes lifecycle and reorganize node-control logic - #7: Remove DA (@andrussal) Remove DA workload usage from framework following node changes - #6: feat: refactor for using external cucumber (@hansieodendaal) Removed all references to cucumber and prepared compose docker workspace for external repo root - #4: Individual nodes connect at runtime (@andrussal) Add option to connect to arbitrary peers when starting a node - #2: feat: add cucumber auto deployer (@hansieodendaal) Added example for selecting deployer based on environment variable - #1: chore: allow older curl versions as well (@hansieodendaal) Allow compatibility with older and newer curl versions Contributors: - @andrussal - @hansieodendaal
21 lines
859 B
Rust
21 lines
859 B
Rust
use std::time::Duration;
|
|
|
|
use testing_framework_core::scenario::{NodeControlCapability, ScenarioBuilder};
|
|
use testing_framework_workflows::{ChaosBuilderExt, ScenarioBuilderExt};
|
|
|
|
use crate::SnippetResult;
|
|
|
|
pub fn chaos_plan()
|
|
-> SnippetResult<testing_framework_core::scenario::Scenario<NodeControlCapability>> {
|
|
ScenarioBuilder::topology_with(|t| t.network_star().validators(3))
|
|
.enable_node_control() // Enable node control capability
|
|
.chaos_with(|c| {
|
|
c.restart() // Random restart chaos
|
|
.min_delay(Duration::from_secs(30)) // Min time between restarts
|
|
.max_delay(Duration::from_secs(60)) // Max time between restarts
|
|
.target_cooldown(Duration::from_secs(45)) // Cooldown after restart
|
|
.apply() // Required for chaos configuration
|
|
})
|
|
.build()
|
|
}
|