]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Start converting remaining unlang function calls to new syntax
authorJames Jones <jejones3141@gmail.com>
Mon, 4 Dec 2023 19:02:21 +0000 (13:02 -0600)
committerAlan DeKok <aland@freeradius.org>
Thu, 18 Jan 2024 14:35:24 +0000 (09:35 -0500)
src/tests/modules/ldap/groups_rfc2307bis.unlang
src/tests/modules/redis_ippool/pool_tool_static.unlang
src/tests/modules/unbound/dns.unlang

index 8e743d3c8827f1e48dfaf50228909d3ac3bf892c..16b07f78af3c00e565a30f0a26fe07abd20821a7 100644 (file)
@@ -6,22 +6,22 @@
 #
 #  Resolve using group name attribute
 #
-if !(%(ldap.memberof:foo) == true) {
+if !(%ldap.memberof("foo") == true) {
         test_fail
 }
 
-if !(%(ldap.memberof:baz) == false) {
+if !(%ldap.memberof("baz") == false) {
         test_fail
 }
 
 #
 #  Resolve using group DN
 #
-if !(%(ldap.memberof:cn=foo,ou=groups,dc=example,dc=com) == true) {
+if !(%ldap.memberof("cn=foo,ou=groups,dc=example,dc=com") == true) {
         test_fail
 }
 
-if !(%(ldap.memberof:cn=baz,ou=groups,dc=example,dc=com) == false) {
+if !(%ldap.memberof("cn=baz,ou=groups,dc=example,dc=com") == false) {
         test_fail
 }
 
index 5e5a36f2d6a28c55e048aa3ce443c9b677aee55f..962a831b093c241ed6d0e3497e14308be2d5e58c 100644 (file)
@@ -43,7 +43,7 @@ if !(&reply.Framed-IP-Address == 192.168.0.10) {
 #
 #  Check the ZSCORE hasn't changed
 #
-if !(%(redis:ZSCORE {%{control.IP-Pool.Name}}:pool %{reply.Framed-IP-Address}) == %{zscore}) {
+if !(%redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, %{reply.Framed-IP-Address}) == %{zscore}) {
        test_fail
 }
 
@@ -98,7 +98,7 @@ if !(%redis(GET, {%{control.IP-Pool.Name}}:device:11:22:33:44:55:66) == '192.168
        test_fail
 }
 
-&zscore := %(redis:ZSCORE {%{control.IP-Pool.Name}}:pool 192.168.0.1)
+&zscore := %redis(ZSCORE, {%{control.IP-Pool.Name}}:pool, 192.168.0.1)
 if !(&zscore < (uint64)0x10000000000000) {
        test_fail
 }
index 05d70f0c83898fa8098712fcd0af35024bf7cde0..6512777d7c46d48c76f036d5b33dd6211bb8fb4f 100644 (file)
@@ -27,7 +27,7 @@ if (&result_ipaddr != 192.168.1.1) {
        test_fail
 }
 
-&result_string := %dns('1.1.168.192.in-addr.arpa',PTR)
+&result_string := %dns('1.1.168.192.in-addr.arpa', 'PTR')
 
 if (&result_string != 'www.example.com') {
        test_fail
@@ -57,7 +57,7 @@ if (&Module-Failure-Message != "Can't resolve zero length host") {
 
 # Will return multiple records, though not in a defined sequence.
 # Each returned record is a pair of priority and host values.
-&Filter-Id := %dns(example.com,MX)
+&Filter-Id := %dns(example.com, 'MX')
 
 if !(((&Filter-Id[0] == '10') && (&Filter-Id[1] == 'mail.example.com') && (&Filter-Id[2] == '20') && (&Filter-Id[3] == 'mail2.example.com')) || ((&Filter-Id[2] == '10') && (&Filter-Id[3] == 'mail.example.com') && (&Filter-Id[0] == '20') && (&Filter-Id[1] == 'mail2.example.com'))) {
        test_fail