]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Test attr_filter on reply list
authorNick Porter <nick@portercomputing.co.uk>
Thu, 20 Jun 2024 16:09:32 +0000 (17:09 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 20 Jun 2024 16:09:32 +0000 (17:09 +0100)
src/tests/modules/attr_filter/operators.unlang

index 80176ca5334c96c79f4c78f2622e21e33e8926cc..1d8cace6970f2042f4cbe9df72516e8e06f7f1f6 100644 (file)
@@ -1,3 +1,6 @@
+# Copy request to reply for later
+&reply := &request
+
 attr_filter
 
 if ((!&NAS-Port) || (&NAS-Port != 10)) {
@@ -24,5 +27,24 @@ if ((&Calling-Station-Id != "bob") || (&Calling-Station-Id[1] != "jim") || (&Cal
         test_fail
 }
 
+if (!&reply.Idle-Timeout) {
+       test_fail
+}
+
+#
+#  Now apply the filter to the reply list
+#
+attr_filter.reply
+
+if (!&NAS-Port || &NAS-Port != 10) {
+       test_fail
+}
+
+if (&reply.Idle-Timeout) {
+       test_fail
+}
+
+&reply := {}
+
 &control.Password.Cleartext := "goodbye"
 &reply.Reply-Message := &Reply-Message