summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandre <andre@openbsd.org>2014-05-02 14:13:41 +0000
committerandre <andre@openbsd.org>2014-05-02 14:13:41 +0000
commitd1cb487fcc754f2911e63a6c4da2b62c76a340fe (patch)
treeb112aec4678fbb6e3863aeefb4a16bb2c7a6349e
parentspelling; Denis Fondras (diff)
downloadwireguard-openbsd-d1cb487fcc754f2911e63a6c4da2b62c76a340fe.tar.xz
wireguard-openbsd-d1cb487fcc754f2911e63a6c4da2b62c76a340fe.zip
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
-rw-r--r--regress/usr.sbin/relayd/args-http-filter-block.pl18
1 files 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),
},
);