I'm pretty confident that we have all the API to do it without LDIF files (we have a lot of integration tests, and I'm pretty sure that we already have some of them which do exactly what you are trying to do).
My concern here is that if you are trying to figure out the way to do it is that I can imagine that a new commer might bump his head against walls doing the very same ... May be a tutorial could help. Let's add a JIRA about this, and try to find the tests case which are the closest to your need . Emmanuel On 3/15/07, Enrique Rodriguez <[EMAIL PROTECTED]> wrote:
On 3/15/07, Alex Karasulu <[EMAIL PROTECTED]> wrote: > ... > However there is a means to load entries into the server using convenience > methods on the unit test classes. You can also refer to an LDIF in your > project's respective resources area to be loaded after startup in the > setUp() method. Is this what you're looking for? I was hoping for something programmatic. An LDIF to add a single OU and a couple principals would work but it is generally regarded as a best practice to not use external files for unit tests. In this case it's an integration test. I'll live. The fundamental problem is that the startup workflow is not modular. The first call to the ServerContextFactory starts both the back-end and the front-end and loading an LDIF is the only recourse to affect changes to the back-end prior to the front-end starting. Incidentally, the ServerContextFactory is not actually a context factory in the JNDI sense; it just happens to extend CoreContextFactory. In other server platforms this would be it's own class for starting the server. As a separate class it could have more modularity options, as well. Anyway, we're now OT for integration testing the protocols. Enrique
-- Cordialement, Emmanuel Lécharny www.iktek.com
