From 8638537d7ebcd65e3fab915c35f87640bc5c7327 Mon Sep 17 00:00:00 2001 From: andre Date: Fri, 9 May 2014 11:53:28 +0000 Subject: [PATCH] Adds a couple tests for relayd parser, specially recent modifications reyk@ did to the grammar. ok reyk --- .../usr.sbin/relayd/args-http-change-path.pl | 24 +++++++++++++++++++ .../usr.sbin/relayd/args-http-mark-marked.pl | 22 +++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 regress/usr.sbin/relayd/args-http-change-path.pl create mode 100644 regress/usr.sbin/relayd/args-http-mark-marked.pl 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 index 00000000000..780eda6261b --- /dev/null +++ b/regress/usr.sbin/relayd/args-http-change-path.pl @@ -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 index 00000000000..6720dd791da --- /dev/null +++ b/regress/usr.sbin/relayd/args-http-mark-marked.pl @@ -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; -- 2.20.1