]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add test for [*] filter in files comparison
authorNick Porter <nick@portercomputing.co.uk>
Wed, 24 Jan 2024 19:36:49 +0000 (19:36 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 24 Jan 2024 19:36:49 +0000 (19:36 +0000)
src/tests/modules/files/any.attrs [new file with mode: 0644]
src/tests/modules/files/any.unlang [new file with mode: 0644]
src/tests/modules/files/authorize

diff --git a/src/tests/modules/files/any.attrs b/src/tests/modules/files/any.attrs
new file mode 100644 (file)
index 0000000..5759a6c
--- /dev/null
@@ -0,0 +1,12 @@
+#
+#  Input packet
+#
+Packet-Type = Access-Request
+User-Name = "any"
+User-Password = "ofcourse"
+
+#
+#  Expected answer
+#
+Packet-Type == Access-Accept
+Reply-Message == 'success-any'
diff --git a/src/tests/modules/files/any.unlang b/src/tests/modules/files/any.unlang
new file mode 100644 (file)
index 0000000..eca8fea
--- /dev/null
@@ -0,0 +1,9 @@
+# Add multiple instances of Realm to the control list
+# The data should match on the second.
+&control += {
+       &Realm = 'one'
+       &Realm = 'two'
+       &Realm = 'three'
+}
+
+files
index 317224dadf537f01e3d255d4daf67ee170c9fdfa..b15e9751de50db18e5156a0ba4e5910969e5237d 100644 (file)
@@ -155,6 +155,11 @@ undo       Password.Cleartext := "hello"
 undo
        Framed-IP-Address := "this is not an IP address"
 
+#
+#  Test where additional checks uses the [*] filter
+#
+any    Realm[*] == "two", Password.Cleartext := "ofcourse"
+       Reply-Message := "success-any"
 
 $INCLUDE cmp