Adds a couple tests for relayd parser, specially recent modifications reyk@ did
authorandre <andre@openbsd.org>
Fri, 9 May 2014 11:53:28 +0000 (11:53 +0000)
committerandre <andre@openbsd.org>
Fri, 9 May 2014 11:53:28 +0000 (11:53 +0000)
to the grammar.

ok reyk

regress/usr.sbin/relayd/args-http-change-path.pl [new file with mode: 0644]
regress/usr.sbin/relayd/args-http-mark-marked.pl [new file with mode: 0644]

diff --git a/regress/usr.sbin/relayd/args-http-change-path.pl b/regress/usr.sbin/relayd/args-http-change-path.pl
new file mode 100644 (file)
index 0000000..780eda6
--- /dev/null
@@ -0,0 +1,24 @@
+use strict;
+use warnings;
+
+our %args = (
+    client => {
+       noclient => 1,
+       nocheck => 1,
+    },
+    relayd => {
+       protocol => [ "http",
+           'request path change "path" to "foobarchangedpath" marked 55',
+       ],
+       loggrep => { 
+               qr/relayd.conf\:.*action only supported for headers/ => 1
+       },
+       dummyrun => 1,
+    },
+    server => {
+       noserver => 1,
+       nocheck => 1,
+    },
+);
+
+1;
diff --git a/regress/usr.sbin/relayd/args-http-mark-marked.pl b/regress/usr.sbin/relayd/args-http-mark-marked.pl
new file mode 100644 (file)
index 0000000..6720dd7
--- /dev/null
@@ -0,0 +1,22 @@
+use strict;
+use warnings;
+
+our %args = (
+    client => {
+       noclient => 1,
+       nocheck => 1,
+    },
+    relayd => {
+       protocol => [ "http",
+           'request path mark "*" with 99 marked 55',
+       ],
+       loggrep => { "either mark or marked" => 1 },
+       dummyrun => 1,
+    },
+    server => {
+       noserver => 1,
+       nocheck => 1,
+    },
+);
+
+1;