From: Nick Porter Date: Wed, 24 Jan 2024 19:36:49 +0000 (+0000) Subject: Add test for [*] filter in files comparison X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ae3364db58b11bce4a397d5afaff687dd4f5ed3;p=thirdparty%2Ffreeradius-server.git Add test for [*] filter in files comparison --- diff --git a/src/tests/modules/files/any.attrs b/src/tests/modules/files/any.attrs new file mode 100644 index 00000000000..5759a6c76ab --- /dev/null +++ b/src/tests/modules/files/any.attrs @@ -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 index 00000000000..eca8fead112 --- /dev/null +++ b/src/tests/modules/files/any.unlang @@ -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 diff --git a/src/tests/modules/files/authorize b/src/tests/modules/files/authorize index 317224dadf5..b15e9751de5 100644 --- a/src/tests/modules/files/authorize +++ b/src/tests/modules/files/authorize @@ -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