update existing test suite usage of "when" statements to include captures

This commit is contained in:
Vern Paxson 2022-01-07 14:54:06 -08:00
parent 98cd3f2213
commit b59ee83979
6 changed files with 9 additions and 9 deletions

View file

@ -22,7 +22,7 @@ redef exit_only_after_terminate=T;
event on_demand_key()
{
local host = 1.2.3.4;
when ( local result = SumStats::request_key("test", [$host=host]) )
when [host] ( local result = SumStats::request_key("test", [$host=host]) )
{
print fmt("Key request for %s", host);
print fmt(" Host: %s -> %.0f", host, result["test.reducer"]$sum);