summaryrefslogtreecommitdiff
path: root/regress/usr.sbin/relayd
diff options
context:
space:
mode:
authorAndre de Oliveira <andre@cvs.openbsd.org>2014-05-05 12:31:57 +0000
committerAndre de Oliveira <andre@cvs.openbsd.org>2014-05-05 12:31:57 +0000
commit8fb87ba52e179f6885d0d0438044ff33b3e5e1e2 (patch)
tree011f2b430e1e7a3d242a7bf9a9b477c649aba524 /regress/usr.sbin/relayd
parent18b6c040c5c3734d518e173bf2f3ecb05a34f5ff (diff)
Replacing test files from previous commit to the right directory. There is no
trigger to run tests from relayd directory, so previous had no practical effect.
Diffstat (limited to 'regress/usr.sbin/relayd')
-rw-r--r--regress/usr.sbin/relayd/args-http-filter-url-digest.pl31
-rw-r--r--regress/usr.sbin/relayd/args-http-filter-url-file.in2
-rw-r--r--regress/usr.sbin/relayd/args-http-filter-url-file.pl29
3 files changed, 62 insertions, 0 deletions
diff --git a/regress/usr.sbin/relayd/args-http-filter-url-digest.pl b/regress/usr.sbin/relayd/args-http-filter-url-digest.pl
new file mode 100644
index 00000000000..c3739a80178
--- /dev/null
+++ b/regress/usr.sbin/relayd/args-http-filter-url-digest.pl
@@ -0,0 +1,31 @@
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&http_client,
+ path => "a/b/c/d/e/f/gindex.html",
+ loggrep => [
+ qr/403 Forbidden/,
+ qr/Server: OpenBSD relayd/,
+ qr/Connection: close/,
+ ],
+ httpnok => 1,
+ },
+ relayd => {
+ protocol => [ "http",
+ 'return error',
+ 'url filter digest 0ac8ccfc03317891ae2820de10ee2167d31ebd16 log',
+ ],
+ loggrep => {
+ qr/rejecting request \(403 Forbidden\)/ => 1,
+ qr/\[0ac8ccfc03317891ae2820de10ee2167d31ebd16:/ => 1,
+ },
+ },
+ server => {
+ noserver => 1,
+ nocheck => 1,
+ },
+);
+
+1;
diff --git a/regress/usr.sbin/relayd/args-http-filter-url-file.in b/regress/usr.sbin/relayd/args-http-filter-url-file.in
new file mode 100644
index 00000000000..20fd8269428
--- /dev/null
+++ b/regress/usr.sbin/relayd/args-http-filter-url-file.in
@@ -0,0 +1,2 @@
+/3
+/0
diff --git a/regress/usr.sbin/relayd/args-http-filter-url-file.pl b/regress/usr.sbin/relayd/args-http-filter-url-file.pl
new file mode 100644
index 00000000000..a048563a1ad
--- /dev/null
+++ b/regress/usr.sbin/relayd/args-http-filter-url-file.pl
@@ -0,0 +1,29 @@
+use strict;
+use warnings;
+
+my @lengths = (1, 2, 4, 0, 3);
+our %args = (
+ client => {
+ func => sub { eval { http_client(@_) }; warn $@ },
+ lengths => \@lengths,
+ loggrep => qr/Forbidden/,
+ },
+ relayd => {
+ protocol => [ "http",
+ 'return error',
+ 'label test_reject_label',
+ 'path filter file args-http-filter-url-file.in log',
+ 'no label',
+ ],
+ loggrep => {
+ qr/rejecting request/ => 1,
+ qr/\[test_reject_label\, \/0\:/ => 1
+ },
+ },
+ server => {
+ func => \&http_server,
+ lengths => (1, 2, 4),
+ },
+);
+
+1;