From: Nick Porter Date: Mon, 25 Jan 2021 09:38:23 +0000 (+0000) Subject: Add test for less than and greater than to rlm_files X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=912775ece795fae1751d4ac19cf06f07f6738fc5;p=thirdparty%2Ffreeradius-server.git Add test for less than and greater than to rlm_files --- diff --git a/src/tests/modules/files/authorize b/src/tests/modules/files/authorize index 8f7c463f5fd..1301f13f817 100644 --- a/src/tests/modules/files/authorize +++ b/src/tests/modules/files/authorize @@ -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 index 00000000000..46948e9eba9 --- /dev/null +++ b/src/tests/modules/files/greaterthanreply.attrs @@ -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 index 00000000000..027271b9b22 --- /dev/null +++ b/src/tests/modules/files/greaterthanreply.unlang @@ -0,0 +1 @@ +files diff --git a/src/tests/modules/files/lessthanreply.attrs b/src/tests/modules/files/lessthanreply.attrs new file mode 100644 index 00000000000..576b5438fc0 --- /dev/null +++ b/src/tests/modules/files/lessthanreply.attrs @@ -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 index 00000000000..027271b9b22 --- /dev/null +++ b/src/tests/modules/files/lessthanreply.unlang @@ -0,0 +1 @@ +files