From 4542a85368dbd508878567d04d16cc9d5ad7f779 Mon Sep 17 00:00:00 2001 From: Nick Porter Date: Wed, 8 Jan 2025 09:54:00 +0000 Subject: [PATCH] Add test of += operator in LDAP update --- src/tests/modules/ldap/auth.unlang | 6 ++++++ src/tests/modules/ldap/module.conf | 1 + 2 files changed, 7 insertions(+) diff --git a/src/tests/modules/ldap/auth.unlang b/src/tests/modules/ldap/auth.unlang index 7a8f883760..853282990e 100644 --- a/src/tests/modules/ldap/auth.unlang +++ b/src/tests/modules/ldap/auth.unlang @@ -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 diff --git a/src/tests/modules/ldap/module.conf b/src/tests/modules/ldap/module.conf index 7c821edd08..3f9ec4b50c 100644 --- a/src/tests/modules/ldap/module.conf +++ b/src/tests/modules/ldap/module.conf @@ -327,6 +327,7 @@ ldap { update { description := "User %{User-Name} authenticated" userPKCS12 := &Class + carLicense += "%randstr(CCnnCCC)" } } } -- 2.47.3