| | |
| | | { |
| | | TestCaseUtils.startServer(); |
| | | beID = "userRoot"; |
| | | configFilePath = DirectoryServer.getConfigFile(); |
| | | configFilePath = DirectoryServer.getConfigFile(); |
| | | TaskUtils.disableBackend(beID); |
| | | |
| | | String entry = |
| | |
| | | "uid: user.0\n" + |
| | | "mail: user.0@example.com\n" + |
| | | "userPassword: password\n" + |
| | | "telephoneNumber: 380-535-2354\n" + |
| | | "telephoneNumber: +1 380-535-2354\n" + |
| | | "description: This is the description for Aaccf Amar\n" + |
| | | "creatorsName: Import\n" + |
| | | "modifiersName: Import\n"; |
| | | "creatorsName: cn=Import\n" + |
| | | "modifiersName: cn=Import\n"; |
| | | |
| | | tempDir = TestCaseUtils.createTemporaryDirectory("importLDIFtest"); |
| | | homeDirName = tempDir.getAbsolutePath(); |
| | |
| | | |
| | | Attribute[] opAttr = |
| | | { |
| | | new Attribute ("creatorsname", "Import") , |
| | | new Attribute("modifiersname","Import") |
| | | new Attribute ("creatorsname", "cn=Import") , |
| | | new Attribute("modifiersname","cn=Import") |
| | | } ; |
| | | //operational attributes shouldn't be present. |
| | | assertEntry(opAttr,false); |
| | |
| | | new Attribute ("description", |
| | | "This is the description for Aaccf Amar"), |
| | | new Attribute("mail","user.0@example.com"), |
| | | new Attribute ("creatorsname", "Import") , |
| | | new Attribute("modifiersname","Import") |
| | | new Attribute ("creatorsname", "cn=Import") , |
| | | new Attribute("modifiersname","cn=Import") |
| | | } ; |
| | | assertEntry(attr,true); |
| | | } |
| | |
| | | assertEquals(ImportLDIF.mainImportLDIF(args,false), 0); |
| | | assertRejectedFile(reject,true); |
| | | Attribute[] attrs = { |
| | | new Attribute ("creatorsname", "Import") , |
| | | new Attribute("modifiersname","Import") |
| | | new Attribute ("creatorsname", "cn=Import") , |
| | | new Attribute("modifiersname","cn=Import") |
| | | }; |
| | | assertEntry(attrs,false); |
| | | } |
| | |
| | | assertEquals(ImportLDIF.mainImportLDIF(args,false), 0); |
| | | assertRejectedFile(reject,true); |
| | | Attribute[] attrs = { |
| | | new Attribute ("creatorsname", "Import") |
| | | new Attribute ("creatorsname", "cn=Import") |
| | | }; |
| | | assertEntry(attrs,true); |
| | | } |
| | |
| | | assertEquals(ImportLDIF.mainImportLDIF(args,false), 0); |
| | | assertRejectedFile(reject,true); |
| | | Attribute[] attrsPr = { |
| | | new Attribute ("creatorsname", "Import") |
| | | new Attribute ("creatorsname", "cn=Import") |
| | | }; |
| | | assertEntry(attrsPr,true); |
| | | Attribute[] attrsAb = { |
| | |
| | | assertEquals(ImportLDIF.mainImportLDIF(args,false), 0); |
| | | assertRejectedFile(reject,true); |
| | | Attribute[] attrsPr = { |
| | | new Attribute ("modifiersname", "Import"), |
| | | new Attribute ("modifiersname", "cn=Import"), |
| | | new Attribute("employeenumber","0") |
| | | }; |
| | | assertEntry(attrsPr,true); |
| | | Attribute[] attrsAb = { |
| | | new Attribute ("creatorsname", "Import"), |
| | | new Attribute ("creatorsname", "cn=Import"), |
| | | new Attribute("givenname","Aaccf") |
| | | }; |
| | | assertEntry(attrsAb,false); |