| | |
| | | */ |
| | | package org.opends.server.backends; |
| | | |
| | | import static org.opends.server.protocols.internal.InternalClientConnection.*; |
| | | import static org.opends.server.protocols.internal.Requests.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.testng.Assert.*; |
| | | |
| | | import java.io.File; |
| | | import java.util.Map; |
| | | |
| | |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.Test; |
| | | |
| | | import static org.opends.server.protocols.internal.InternalClientConnection.*; |
| | | import static org.opends.server.protocols.internal.Requests.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.testng.Assert.*; |
| | | |
| | | /** |
| | | * A set of test cases for the schema backend. |
| | | */ |
| | |
| | | * @throws Exception If an unexpected problem occurs. |
| | | */ |
| | | @Test |
| | | public void testImportLDIF() |
| | | throws Exception |
| | | public void testImportLDIF() throws Exception |
| | | { |
| | | File tempFile = File.createTempFile("schema", "testImportLDIF"); |
| | | tempFile.deleteOnExit(); |
| | |
| | | |
| | | schemaBackend.exportLDIF(exportConfig); |
| | | |
| | | LDIFImportConfig importConfig = |
| | | new LDIFImportConfig(tempFile.getAbsolutePath()); |
| | | |
| | | schemaBackend.importLDIF(importConfig); |
| | | LDIFImportConfig importConfig = new LDIFImportConfig(tempFile.getAbsolutePath()); |
| | | schemaBackend.importLDIF(importConfig, DirectoryServer.getInstance().getServerContext()); |
| | | } |
| | | |
| | | |
| | |
| | | * @throws Exception If an unexpected problem occurs. |
| | | */ |
| | | @Test |
| | | public void testGetComponentEntryDN() |
| | | throws Exception |
| | | public void testGetComponentEntryDN() throws Exception |
| | | { |
| | | DN configEntryDN = |
| | | DN.valueOf("ds-cfg-backend-id=schema,cn=Backends,cn=config"); |