aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/atlocal.in2
-rw-r--r--tests/check.at2
-rw-r--r--tests/checkf.at2
-rw-r--r--tests/dump.at2
-rw-r--r--tests/rate.at2
-rw-r--r--tests/ratef.at2
-rw-r--r--tests/strftime.at2
8 files changed, 8 insertions, 7 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 30b0360..23fa477 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,12 +28,13 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
echo '# Signature of the current package.'; \
echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+ echo 'm4_define([AT_VMOD_BASENAME], [@AC_VMOD_BASENAME@])'; \
} >$(srcdir)/package.m4
#
## ------------ ##
## Test suite. ##
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 9f80ebf..f901648 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -1,7 +1,7 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for vmod_tbf test suite.
# Copyright (C) 2017 Sergey Poznyakoff
-PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:$PATH
+PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:@VARNISH_SBINDIR@:$PATH
VARNISHTEST=@VARNISHTEST@
VARNISHD=@VARNISHD@
diff --git a/tests/check.at b/tests/check.at
index f45c1b1..9ed2974 100644
--- a/tests/check.at
+++ b/tests/check.at
@@ -12,13 +12,13 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([check])
AT_KEYWORDS([check])
-AT_VARNISHTEST([tbf],[
+AT_VARNISHTEST([
sub vcl_recv {
if (!tbf.check("url:"+req.url, "4 req/s")) {
return (synth(420, "Overlimit"));
}
}
],
diff --git a/tests/checkf.at b/tests/checkf.at
index c4155ba..f85c4a4 100644
--- a/tests/checkf.at
+++ b/tests/checkf.at
@@ -12,13 +12,13 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([check flow])
AT_KEYWORDS([checkf flow])
-AT_VARNISHTEST([tbf],[
+AT_VARNISHTEST([
sub vcl_deliver {
set resp.http.result = tbf.check("url:"+req.url, "4req/s");
}
],
[ txreq -url "/"
rxresp
diff --git a/tests/dump.at b/tests/dump.at
index b4230de..6602697 100644
--- a/tests/dump.at
+++ b/tests/dump.at
@@ -13,13 +13,13 @@
#
# You should have received a copy of the GNU General Public License
# along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([dump/load facilities])
AT_KEYWORDS([dump load])
-AT_VARNISHTEST([tbf],[
+AT_VARNISHTEST([
# sub vcl_init {
# tbf.debug(20);
# }
sub vcl_recv {
if (req.url == "/dump") {
tbf.dump("/tmp/test05.dump");
diff --git a/tests/rate.at b/tests/rate.at
index 75d9df4..e13473d 100644
--- a/tests/rate.at
+++ b/tests/rate.at
@@ -13,13 +13,13 @@
#
# You should have received a copy of the GNU General Public License
# along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([rate])
AT_KEYWORDS([rate])
-AT_VARNISHTEST([tbf],[
+AT_VARNISHTEST([
sub vcl_recv {
if (!tbf.rate("url:"+req.url, 1, 20 s, 5)) {
return (synth(420, "Overlimit"));
}
return (hash);
}
diff --git a/tests/ratef.at b/tests/ratef.at
index d0dc7ea..40a86e6 100644
--- a/tests/ratef.at
+++ b/tests/ratef.at
@@ -13,13 +13,13 @@
#
# You should have received a copy of the GNU General Public License
# along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([rate flow])
AT_KEYWORDS([ratef flow])
-AT_VARNISHTEST([tbf],[
+AT_VARNISHTEST([
sub vcl_deliver {
set resp.http.result = tbf.rate("url:"+req.url, 1, 1s, 5);
}
],
[ txreq -url "/"
rxresp
diff --git a/tests/strftime.at b/tests/strftime.at
index 58fc723..55b04fd 100644
--- a/tests/strftime.at
+++ b/tests/strftime.at
@@ -13,13 +13,13 @@
#
# You should have received a copy of the GNU General Public License
# along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>.
AT_SETUP([strftime])
AT_KEYWORDS([strftime])
-AT_VARNISHTEST([tbf],[
+AT_VARNISHTEST([
sub vcl_deliver {
set resp.http.result = tbf.strftime("%Y-%m-%d", 26697600);
}
],
[ txreq
rxresp

Return to:

Send suggestions and report system problems to the System administrator.