directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <seelm...@apache.org>
Subject Re: ApplyLdifs
Date Fri, 16 Sep 2011 22:07:44 GMT
Please try to concat the LDIF with commas like this:

@ApplyLdifs(
    {
        "dn: cn=jon4,ou=system",
        "objectClass: person",
        "cn: jon4",
        "sn: Carlson"
})

Here is a full working example: https://gist.github.com/2dbfa4eb8d0120a3e297

Kind Regards,
Stefan


On Fri, Sep 16, 2011 at 8:49 PM, Jonathan Carlson <jon@code42.com> wrote:
> I'm hoping there is an easy answer to this...
>
> When I specify @ApplyLdifs on the test class it *always* tells me that the dn exists
already, even if it is the first time I've run it.
>
> @ApplyLdifs({
> "dn: cn=jon4,ou=system\n" +
> "objectClass: person\n" +
> "cn: jon4\n" +
> "sn: Carlson\n"
> })
> @RunWith(FrameworkRunner.class)
> @CreateLdapServer(
> allowAnonymousAccess = true,
> transports = { @CreateTransport(protocol = "LDAP") })
>
> org.apache.directory.shared.ldap.exception.LdapEntryAlreadyExistsException: ERR_250 cn=jon4,ou=system
already exists!
>
> Yet, when I move the @ApplyLdifs to a method, the method doesn't get run by jUnit.
>
> I'm using the Apache DS version 1.5.7 libraries...
>
> Thanks!
>
> jon carlson   |  codefortytwo software
> 1 Main St SE, #400     |   Minneapolis, MN 55414
> Office: 612.333.4242  |   web: www.code42.com<http://www.code42.com/>
>
>

Mime
View raw message