mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
a number of BTests updated with @if ... &analyze
This commit is contained in:
parent
8e375d34b7
commit
e749638380
16 changed files with 24 additions and 24 deletions
|
@ -26,7 +26,7 @@ redef Log::default_rotation_interval = 0secs;
|
||||||
|
|
||||||
global hll_data: event(data: opaque of cardinality);
|
global hll_data: event(data: opaque of cardinality);
|
||||||
|
|
||||||
@if ( Cluster::local_node_type() == Cluster::WORKER )
|
@if ( Cluster::local_node_type() == Cluster::WORKER ) &analyze
|
||||||
|
|
||||||
event zeek_init()
|
event zeek_init()
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,7 @@ event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ( Cluster::local_node_type() == Cluster::MANAGER )
|
@if ( Cluster::local_node_type() == Cluster::MANAGER ) &analyze
|
||||||
|
|
||||||
global result_count = 0;
|
global result_count = 0;
|
||||||
global hll: opaque of cardinality;
|
global hll: opaque of cardinality;
|
||||||
|
|
|
@ -33,7 +33,7 @@ event terminate_me() {
|
||||||
terminate();
|
terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@if ( Cluster::local_node_type() == Cluster::WORKER )
|
@if ( Cluster::local_node_type() == Cluster::WORKER ) &analyze
|
||||||
event zeek_init()
|
event zeek_init()
|
||||||
{
|
{
|
||||||
suspend_processing();
|
suspend_processing();
|
||||||
|
|
|
@ -35,7 +35,7 @@ event terminate_me() {
|
||||||
terminate();
|
terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@if ( Cluster::local_node_type() == Cluster::WORKER )
|
@if ( Cluster::local_node_type() == Cluster::WORKER ) &analyze
|
||||||
event zeek_init()
|
event zeek_init()
|
||||||
{
|
{
|
||||||
suspend_processing();
|
suspend_processing();
|
||||||
|
|
|
@ -43,7 +43,7 @@ event zeek_init()
|
||||||
Broker::auto_publish(Cluster::worker_topic, ready_for_data);
|
Broker::auto_publish(Cluster::worker_topic, ready_for_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@if ( Cluster::node == "worker-1" )
|
@if ( Cluster::node == "worker-1" ) &analyze
|
||||||
event Cluster::Experimental::cluster_started()
|
event Cluster::Experimental::cluster_started()
|
||||||
{
|
{
|
||||||
Config::set_value("testport", 44/tcp);
|
Config::set_value("testport", 44/tcp);
|
||||||
|
|
|
@ -38,14 +38,14 @@ global n = 0;
|
||||||
|
|
||||||
event ready_for_data()
|
event ready_for_data()
|
||||||
{
|
{
|
||||||
@if ( Cluster::node == "manager-1" )
|
if ( Cluster::node == "manager-1" )
|
||||||
Config::set_value("testcount", 1);
|
Config::set_value("testcount", 1);
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ( Cluster::node == "worker-1" )
|
if ( Cluster::node == "worker-1" )
|
||||||
Config::set_value("testport", 44/tcp);
|
{
|
||||||
Config::set_value("teststring", "b", "comment");
|
Config::set_value("testport", 44/tcp);
|
||||||
@endif
|
Config::set_value("teststring", "b", "comment");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
global option_changed_count = 0;
|
global option_changed_count = 0;
|
||||||
|
@ -72,7 +72,7 @@ event zeek_init() &priority=5
|
||||||
Option::set_change_handler("testcount", option_changed, -100);
|
Option::set_change_handler("testcount", option_changed, -100);
|
||||||
}
|
}
|
||||||
|
|
||||||
@if ( Cluster::local_node_type() == Cluster::MANAGER )
|
@if ( Cluster::local_node_type() == Cluster::MANAGER ) &analyze
|
||||||
|
|
||||||
global peer_count = 0;
|
global peer_count = 0;
|
||||||
event Cluster::node_up(name: string, id: string) &priority=-5
|
event Cluster::node_up(name: string, id: string) &priority=-5
|
||||||
|
|
|
@ -94,7 +94,7 @@ event Broker::peer_lost(endpoint: Broker::EndpointInfo, msg: string)
|
||||||
terminate();
|
terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@if ( Cluster::is_enabled() && Cluster::local_node_type() == Cluster::MANAGER )
|
@if ( Cluster::is_enabled() && Cluster::local_node_type() == Cluster::MANAGER ) &analyze
|
||||||
event die()
|
event die()
|
||||||
{
|
{
|
||||||
terminate();
|
terminate();
|
||||||
|
|
|
@ -33,7 +33,7 @@ redef Log::default_rotation_interval=0sec;
|
||||||
|
|
||||||
module Intel;
|
module Intel;
|
||||||
|
|
||||||
@if ( Cluster::local_node_type() == Cluster::MANAGER )
|
@if ( Cluster::local_node_type() == Cluster::MANAGER ) &analyze
|
||||||
redef Intel::read_files += { "../intel.dat" };
|
redef Intel::read_files += { "../intel.dat" };
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ redef Cluster::nodes = {
|
||||||
@load base/frameworks/reporter
|
@load base/frameworks/reporter
|
||||||
@load base/protocols/conn
|
@load base/protocols/conn
|
||||||
|
|
||||||
@if ( Cluster::node == "worker-1" )
|
@if ( Cluster::node == "worker-1" ) &analyze
|
||||||
redef exit_only_after_terminate = T;
|
redef exit_only_after_terminate = T;
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ redef Cluster::nodes = {
|
||||||
@load base/protocols/http
|
@load base/protocols/http
|
||||||
@load base/frameworks/cluster
|
@load base/frameworks/cluster
|
||||||
|
|
||||||
@if ( Cluster::node == "worker-1" )
|
@if ( Cluster::node == "worker-1" ) &analyze
|
||||||
redef exit_only_after_terminate = T;
|
redef exit_only_after_terminate = T;
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ redef exit_only_after_terminate = T;
|
||||||
|
|
||||||
@load base/frameworks/netcontrol
|
@load base/frameworks/netcontrol
|
||||||
|
|
||||||
@if ( Cluster::local_node_type() == Cluster::WORKER )
|
@if ( Cluster::local_node_type() == Cluster::WORKER ) &analyze
|
||||||
event zeek_init()
|
event zeek_init()
|
||||||
{
|
{
|
||||||
suspend_processing();
|
suspend_processing();
|
||||||
|
|
|
@ -61,7 +61,7 @@ event Notice::begin_suppression(ts: time, suppress_for: interval, note: Notice::
|
||||||
Broker::publish(Cluster::node_topic("manager-1"), proceed);
|
Broker::publish(Cluster::node_topic("manager-1"), proceed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@if ( Cluster::local_node_type() == Cluster::MANAGER )
|
@if ( Cluster::local_node_type() == Cluster::MANAGER ) &analyze
|
||||||
|
|
||||||
event Cluster::Experimental::cluster_started()
|
event Cluster::Experimental::cluster_started()
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@ redef Log::default_rotation_interval = 0secs;
|
||||||
|
|
||||||
global of_controller: OpenFlow::Controller;
|
global of_controller: OpenFlow::Controller;
|
||||||
|
|
||||||
@if ( Cluster::local_node_type() == Cluster::WORKER )
|
@if ( Cluster::local_node_type() == Cluster::WORKER ) &analyze
|
||||||
event zeek_init()
|
event zeek_init()
|
||||||
{
|
{
|
||||||
suspend_processing();
|
suspend_processing();
|
||||||
|
|
|
@ -78,7 +78,7 @@ event ready_for_data()
|
||||||
did_data = T;
|
did_data = T;
|
||||||
}
|
}
|
||||||
|
|
||||||
@if ( Cluster::local_node_type() == Cluster::MANAGER )
|
@if ( Cluster::local_node_type() == Cluster::MANAGER ) &analyze
|
||||||
|
|
||||||
event second_test()
|
event second_test()
|
||||||
{
|
{
|
||||||
|
|
|
@ -66,7 +66,7 @@ event run_test()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@if ( Cluster::node == "manager-1" )
|
@if ( Cluster::node == "manager-1" ) &analyze
|
||||||
# Use a dynamic metrics port for testing to avoid colliding on 9911/tcp
|
# Use a dynamic metrics port for testing to avoid colliding on 9911/tcp
|
||||||
# when running tests in parallel.
|
# when running tests in parallel.
|
||||||
global orig_metrics_port = Broker::metrics_port;
|
global orig_metrics_port = Broker::metrics_port;
|
||||||
|
|
|
@ -22,7 +22,7 @@ redef Management::Agent::name = "agent";
|
||||||
# Tell the agent where to locate the controller.
|
# Tell the agent where to locate the controller.
|
||||||
redef Management::Agent::controller = [$address="127.0.0.1", $bound_port=to_port(getenv("ZEEK_CONTROLLER_PORT"))];
|
redef Management::Agent::controller = [$address="127.0.0.1", $bound_port=to_port(getenv("ZEEK_CONTROLLER_PORT"))];
|
||||||
|
|
||||||
@if ( Supervisor::is_supervised() )
|
@if ( Supervisor::is_supervised() ) &analyze
|
||||||
|
|
||||||
@load policy/frameworks/management/agent/api
|
@load policy/frameworks/management/agent/api
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
redef Log::default_rotation_interval = 0sec;
|
redef Log::default_rotation_interval = 0sec;
|
||||||
|
|
||||||
@if ( Supervisor::is_supervisor() )
|
@if ( Supervisor::is_supervisor() ) &analyze
|
||||||
|
|
||||||
redef SupervisorControl::enable_listen = T;
|
redef SupervisorControl::enable_listen = T;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue