]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add test of += operator in LDAP update
authorNick Porter <nick@portercomputing.co.uk>
Wed, 8 Jan 2025 09:54:00 +0000 (09:54 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 8 Jan 2025 09:54:00 +0000 (09:54 +0000)
src/tests/modules/ldap/auth.unlang
src/tests/modules/ldap/module.conf

index 7a8f883760099957a92d518c6abc1d175cc5849c..853282990eb0f40997725cd16a39a5a45419ecdc 100644 (file)
@@ -84,4 +84,10 @@ if (&test_octets != 0x01020304) {
        test_fail
 }
 
+# carLicense is being populated with += - so there should be 3 instances now
+&control.Filter-Id := %ldap("ldap://$ENV{TEST_SERVER}/uid=john,ou=people,dc=example,dc=com?carLicense")
+if (&control.Filter-Id[#] != 3) {
+       test_fail
+}
+
 test_pass
index 7c821edd08b4572e5f49533812c49703bb12225a..3f9ec4b50cf2206ccb7b15c4bac3213729e246a7 100644 (file)
@@ -327,6 +327,7 @@ ldap {
                        update {
                                description := "User %{User-Name} authenticated"
                                userPKCS12 := &Class
+                               carLicense += "%randstr(CCnnCCC)"
                        }
                }
        }