zeek/testing/btest/scripts/base/protocols/http/multipart-file-limit.zeek
Jon Siwek 7967a5b0aa General btest cleanup
- Use `-b` most everywhere, it will save time.

- Start some intel tests upon the input file being fully read instead of
  at an arbitrary time.

- Improve termination condition for some sumstats/cluster tests.

- Filter uninteresting output from some supervisor tests.

- Test for `notice_policy.log` is no longer needed.
2020-08-11 11:26:22 -07:00

23 lines
830 B
Text

# @TEST-EXEC: zeek -b -C -r $TRACES/http/multipart.trace base/protocols/http
# @TEST-EXEC: btest-diff http.log
# @TEST-EXEC: zeek -b -C -r $TRACES/http/multipart.trace base/protocols/http %INPUT >out-limited
# @TEST-EXEC: mv http.log http-limited.log
# @TEST-EXEC: btest-diff http-limited.log
# @TEST-EXEC: btest-diff out-limited
# @TEST-EXEC: zeek -b -C -r $TRACES/http/multipart.trace base/protocols/http %INPUT ignore_http_file_limit=T >out-limit-ignored
# @TEST-EXEC: mv http.log http-limit-ignored.log
# @TEST-EXEC: btest-diff http-limit-ignored.log
# @TEST-EXEC: btest-diff out-limit-ignored
option ignore_http_file_limit = F;
redef HTTP::max_files_orig = 1;
redef HTTP::max_files_resp = 1;
hook HTTP::max_files_policy(f: fa_file, is_orig: bool)
{
print "max_files reached";
if ( ignore_http_file_limit )
break;
}