Update for the active http test to force it to use ipv4.

It was having trouble because the httpd.py script would start up
a webserver on ipv4 but on some platforms and with some versions
of curl "localhost" will attempt to connect to ::1.
This commit is contained in:
Seth Hall 2014-05-15 21:00:37 -04:00
parent b36df2a272
commit dad8c9a74d

View file

@ -1,7 +1,7 @@
# @TEST-REQUIRES: which python # @TEST-REQUIRES: which python
# @TEST-REQUIRES: which curl # @TEST-REQUIRES: which curl
# #
# @TEST-EXEC: btest-bg-run httpd python $SCRIPTS/httpd.py --max 1 # @TEST-EXEC: btest-bg-run httpd python $SCRIPTS/httpd.py --max 1 --addr=127.0.0.1
# @TEST-EXEC: sleep 3 # @TEST-EXEC: sleep 3
# @TEST-EXEC: btest-bg-run bro bro -b %INPUT # @TEST-EXEC: btest-bg-run bro bro -b %INPUT
# @TEST-EXEC: btest-bg-wait 15 # @TEST-EXEC: btest-bg-wait 15
@ -13,7 +13,7 @@ redef exit_only_after_terminate = T;
event bro_init() event bro_init()
{ {
local req = ActiveHTTP::Request($url="localhost:32123"); local req = ActiveHTTP::Request($url="127.0.0.1:32123");
when ( local resp = ActiveHTTP::request(req) ) when ( local resp = ActiveHTTP::request(req) )
{ {