]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add test for less than and greater than to rlm_files
authorNick Porter <nick@portercomputing.co.uk>
Mon, 25 Jan 2021 09:38:23 +0000 (09:38 +0000)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 26 Apr 2021 18:36:20 +0000 (14:36 -0400)
src/tests/modules/files/authorize
src/tests/modules/files/greaterthanreply.attrs [new file with mode: 0644]
src/tests/modules/files/greaterthanreply.unlang [new file with mode: 0644]
src/tests/modules/files/lessthanreply.attrs [new file with mode: 0644]
src/tests/modules/files/lessthanreply.unlang [new file with mode: 0644]

index 8f7c463f5fdc733ee35aee1e12c95fd68b07a900..1301f13f817992ffc807499305bda2f31f202fe4 100644 (file)
@@ -84,6 +84,22 @@ overwritereply  Password.Cleartext := "testing123"
 overwritereply  Password.Cleartext := "testing123"
                 Reply-Message := "secondpass"
 
+lessthanreply  Password.Cleartext := "testing123"
+               Reply-Message := "eee",
+               Reply-Message += "aaa",
+               Fall-Through = yes
+
+lessthanreply  Password.Cleartext := "testing123"
+               Reply-Message <= "ddd"
+
+greaterthanreply  Password.Cleartext := "testing123"
+                  Reply-Message := "eee",
+                  Reply-Message += "aaa",
+                  Fall-Through = yes
+
+greaterthanreply  Password.Cleartext := "testing123"
+                  Reply-Message >= "ddd"
+
 #
 #  Addition "+=" to the control list
 #
diff --git a/src/tests/modules/files/greaterthanreply.attrs b/src/tests/modules/files/greaterthanreply.attrs
new file mode 100644 (file)
index 0000000..46948e9
--- /dev/null
@@ -0,0 +1,13 @@
+#
+#  Input packet
+#
+Packet-Type = Access-Request
+User-Name = "greaterthanreply"
+User-Password = "testing123"
+
+#
+#  Expected answer
+#
+Packet-Type == Access-Accept
+Reply-Message == 'eee'
+Reply-Message == 'ddd'
diff --git a/src/tests/modules/files/greaterthanreply.unlang b/src/tests/modules/files/greaterthanreply.unlang
new file mode 100644 (file)
index 0000000..027271b
--- /dev/null
@@ -0,0 +1 @@
+files
diff --git a/src/tests/modules/files/lessthanreply.attrs b/src/tests/modules/files/lessthanreply.attrs
new file mode 100644 (file)
index 0000000..576b543
--- /dev/null
@@ -0,0 +1,13 @@
+#
+#  Input packet
+#
+Packet-Type = Access-Request
+User-Name = "lessthanreply"
+User-Password = "testing123"
+
+#
+#  Expected answer
+#
+Packet-Type == Access-Accept
+Reply-Message == 'ddd'
+Reply-Message == 'aaa'
diff --git a/src/tests/modules/files/lessthanreply.unlang b/src/tests/modules/files/lessthanreply.unlang
new file mode 100644 (file)
index 0000000..027271b
--- /dev/null
@@ -0,0 +1 @@
+files