]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
tests for local templates
authorAlan T. DeKok <aland@freeradius.org>
Wed, 8 Sep 2021 15:39:23 +0000 (11:39 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 8 Sep 2021 15:39:23 +0000 (11:39 -0400)
src/tests/keywords/radius.conf
src/tests/keywords/template_test [new file with mode: 0644]

index 14fa4de67da054cae967e91c4f387a4c7d69cedd..c2bd2522032ad0a276663731143de4ecaba1ceec 100644 (file)
@@ -52,6 +52,18 @@ modules {
        mschap {
 
        }
+
+       #
+       #  Tests for in-line templates
+       #
+       template foo {
+               rcode = ok
+       }
+
+       always template_test {
+$TEMPLATE foo
+       }
+
 }
 
 policy {
diff --git a/src/tests/keywords/template_test b/src/tests/keywords/template_test
new file mode 100644 (file)
index 0000000..edea671
--- /dev/null
@@ -0,0 +1,9 @@
+#
+#  PRE: update
+#
+template_test
+if (!ok) {
+       test_fail
+}
+
+success