From d1cb487fcc754f2911e63a6c4da2b62c76a340fe Mon Sep 17 00:00:00 2001 From: andre Date: Fri, 2 May 2014 14:13:41 +0000 Subject: [PATCH] Improves this test to be more strict on the filter action test. Now it dispatches 4 requests from the client and checks if the server receives only 3. Previous functionality kept. ok reyk --- .../usr.sbin/relayd/args-http-filter-block.pl | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/regress/usr.sbin/relayd/args-http-filter-block.pl b/regress/usr.sbin/relayd/args-http-filter-block.pl index 56b8556dba4..10c6d437fd5 100644 --- a/regress/usr.sbin/relayd/args-http-filter-block.pl +++ b/regress/usr.sbin/relayd/args-http-filter-block.pl @@ -3,26 +3,22 @@ use strict; use warnings; +my @lengths = (1, 2, 0, 3); our %args = ( client => { - func => sub { - eval { http_client(@_) }; - warn $@; - $@ =~ /missing http 1 response/ - or die "http not filtered"; - }, - len => 1, - nocheck => 1, + func => sub { eval { http_client(@_) }; warn $@ }, + loggrep => qr/Client missing http 3 response/, + lengths => \@lengths, }, relayd => { protocol => [ "http", - 'request path filter "/1"', + 'request path filter "/3"', ], loggrep => qr/rejecting request/, }, server => { - noserver => 1, - nocheck => 1, + func => \&http_server, + lengths => (1, 2, 0), }, ); -- 2.20.1