For testing purposes I started to use in-memory ldap server
val config = InMemoryDirectoryServerConfig(baseDn)
config.addAdditionalBindCredentials("cn=$LOGIN", PASSWORD)
config.schema = null
val server = InMemoryDirectoryServer(config)
val importFromLDIF = server .importFromLDIF(
true,
ResourceUtils.getFile("classpath:dump.ldif"),
)
ds.startListening()
I wanted to test the case when I change userPrincipalName
with userPrincipalName
which already in use by another user.
Expected result - server will respond with error
Actual result - userPrincipalName
was successfully changed
On real server I get an error. Is there way to make the same behaviour on in-memory ldap server ?