Simplify btests using cluster_started event.

This commit is contained in:
Jan Grashoefer 2023-04-26 20:00:44 +02:00
parent 4ddf7562b9
commit 342d88fbd4
30 changed files with 92 additions and 405 deletions

View file

@ -22,21 +22,18 @@ redef Cluster::nodes = {
};
@TEST-END-FILE
@load base/frameworks/cluster
@load policy/frameworks/cluster/experimental
@load base/frameworks/intel
module Intel;
redef Log::default_rotation_interval=0sec;
event Cluster::node_up(name: string, id: string)
event Cluster::Experimental::cluster_started()
{
# Insert the data once both workers are connected.
if ( Cluster::local_node_type() == Cluster::MANAGER &&
Cluster::get_active_node_count(Cluster::WORKER) == 2 )
{
if ( Cluster::local_node_type() == Cluster::MANAGER )
Intel::insert([$indicator="1.2.3.4", $indicator_type=Intel::ADDR, $meta=[$source="manager"]]);
}
}
global log_writes = 0;