| | |
| | | } |
| | | |
| | | @Test |
| | | public void testImportCaseInsensitiveDNs() throws Exception |
| | | public void importCaseInsensitiveDNs() throws Exception |
| | | { |
| | | String top2 = |
| | | "dn: dc=case_insensitive_dns,dc=importtest,dc=com\n" |
| | |
| | | } |
| | | |
| | | @Test |
| | | public void testImportDNsWithInteger() throws Exception |
| | | public void importDNsWithInteger() throws Exception |
| | | { |
| | | String entryWithIntegerInDN = |
| | | "dn: photo=#04020001,ou=People,dc=importtest,dc=com\n" |
| | |
| | | } |
| | | } |
| | | |
| | | @Test(dependsOnMethods = { "testImportCaseInsensitiveDNs", "testImportDNsWithInteger" }) |
| | | public void testImportAll() throws Exception |
| | | @Test(dependsOnMethods = { "importCaseInsensitiveDNs", "importDNsWithInteger" }) |
| | | public void importAll() throws Exception |
| | | { |
| | | RejectSkippedEntries entries = new RejectSkippedEntries(); |
| | | LDIFImportConfig importConfig = newLDIFImportConfig(entries, "top.ldif", "entries1.ldif"); |
| | |
| | | assertImportedData(); |
| | | } |
| | | |
| | | @Test(dependsOnMethods = "testImportAll") |
| | | public void testImportPartial() throws Exception |
| | | @Test(dependsOnMethods = "importAll") |
| | | public void importPartial() throws Exception |
| | | { |
| | | Set<DN> includeBranches = Collections.singleton(DN.valueOf("ou=People,dc=importtest,dc=com")); |
| | | Set<DN> excludeBranches = Collections.singleton(DN.valueOf("ou=Others,ou=People,dc=importtest,dc=com")); |
| | |
| | | } |
| | | } |
| | | |
| | | @Test(dependsOnMethods = "testImportPartial") |
| | | public void testImportReplaceExisting() throws Exception |
| | | @Test(dependsOnMethods = "importPartial") |
| | | public void importReplaceExisting() throws Exception |
| | | { |
| | | RejectSkippedEntries entries = new RejectSkippedEntries(); |
| | | LDIFImportConfig importConfig = newLDIFImportConfig(entries, "replacement1.ldif"); |
| | |
| | | return backend.verifyBackend(verifyConfig); |
| | | } |
| | | |
| | | @Test(dependsOnMethods = "testImportReplaceExisting") |
| | | public void testImportNoParent() throws Exception |
| | | @Test(dependsOnMethods = "importReplaceExisting") |
| | | public void importNoParent() throws Exception |
| | | { |
| | | RejectSkippedEntries entries = new RejectSkippedEntries(); |
| | | LDIFImportConfig importConfig = newLDIFImportConfig(entries, "replacement1.ldif"); |
| | |
| | | softly.assertAll(); |
| | | } |
| | | |
| | | @Test(dependsOnMethods = "testImportReplaceExisting") |
| | | public void testImportAppend() throws Exception |
| | | @Test(dependsOnMethods = "importReplaceExisting") |
| | | public void importAppend() throws Exception |
| | | { |
| | | RejectSkippedEntries entries = new RejectSkippedEntries(); |
| | | LDIFImportConfig importConfig = newLDIFImportConfig(entries, "top.ldif"); |
| | |
| | | assertImportedData(); |
| | | } |
| | | |
| | | @Test(dependsOnMethods = "testImportPartial") |
| | | public void testImportNotReplaceExisting() throws Exception |
| | | @Test(dependsOnMethods = "importPartial") |
| | | public void importNotReplaceExisting() throws Exception |
| | | { |
| | | RejectSkippedEntries entries = new RejectSkippedEntries(); |
| | | LDIFImportConfig importConfig = newLDIFImportConfig(entries, "replacement1.ldif"); |
| | |
| | | softly.assertAll(); |
| | | } |
| | | |
| | | @Test(dependsOnMethods = "testImportPartial") |
| | | public void testImportSkip() throws Exception |
| | | @Test(dependsOnMethods = "importPartial") |
| | | public void importSkip() throws Exception |
| | | { |
| | | Set<DN> excludeBranches = Collections.singleton(DN.valueOf("dc=skipped,dc=importtest1,dc=com")); |
| | | RejectSkippedEntries entries = new RejectSkippedEntries(); |