Thanks a lot for detailed response! My test LDAP server is created in java unit test https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/test/java/org/apache/openmeetings/ldap/TestLdap.java#L69
Shall I start 2 servers to test referrals? On Thu, 16 Apr 2020 at 00:04, Stefan Seelmann <[email protected]> wrote: > On 4/15/20 4:56 PM, Maxim Solodovnik wrote: > > Current implementation is covered by unit tests (thanks again :)) > > But not my test LDAP [1] need to be tuned to have: > > 1) referral entry > > 2) binary attribute > > I would like to ask for the help with this > > > > is it possible to have referral in same ldif file? > > Do you have a single test LDAP server running? In that case it's still > possible to test referrals. > > You can inject an referal entry pointing to the same server, it looks > like in [2]. But you need to adjust the hostname and especially the port > of the ref attribute in code. Or you run the test LDAP server with a > fixed port instead of a dynamic/free one which may cause testing issues > if the port is already in use. > > Another option is to inject the referral entry via code like in [3]. > > > Is it possible to have binary data? if so is there any option to get mime > > type of this data? > > Binary data in LDIF is defined with 2 colons and the base64 encoded > value. Lines can be wrapped with one leading space for each wrapped > line. Example in [4]. > > There is no mime type in LDAP. But attributes types have a syntax which > defines the type of data (string, number), however in many cases like > jpegPhoto the syntax is just OctetString which is not very helpful and > often the data are gifs or bmps... > > Kind Regards, > Stefan > > [2] > > https://github.com/apache/directory-studio/blob/master/tests/test.integration.ui/src/main/resources/org/apache/directory/studio/test/integration/ui/BrowserTest.ldif#L280 > [3] > > https://github.com/apache/directory-studio/blob/master/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java#L133 > [4] > > https://github.com/apache/directory-studio/blob/master/tests/test.integration.ui/src/main/resources/org/apache/directory/studio/test/integration/ui/EntryEditorTest.ldif#L28 > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Best regards, Maxim
