mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added test to check that restore status was picking up missing destination node
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2831 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -165,11 +165,11 @@ public class ArchiveAndRestoreTest extends TestCase
|
||||
* Create the following:
|
||||
* <pre>
|
||||
* root
|
||||
* / | \
|
||||
* / | \
|
||||
* / | \
|
||||
* / | \
|
||||
* A <-> B X
|
||||
* / |
|
||||
* / |
|
||||
* / |
|
||||
* / |
|
||||
* A <-> B
|
||||
* |\ /|
|
||||
* | \ / |
|
||||
* | \/ |
|
||||
@@ -500,6 +500,17 @@ public class ArchiveAndRestoreTest extends TestCase
|
||||
txn.begin();
|
||||
}
|
||||
|
||||
public void testRestoreToMissingParent() throws Exception
|
||||
{
|
||||
nodeService.deleteNode(a);
|
||||
nodeService.deleteNode(b);
|
||||
commitAndBeginNewTransaction();
|
||||
|
||||
// attempt to restore b_ to a
|
||||
RestoreNodeReport report = nodeArchiveService.restoreArchivedNode(b_, a, null, null);
|
||||
assertEquals("Incorrect report status", RestoreStatus.FAILURE_INVALID_PARENT, report.getStatus());
|
||||
}
|
||||
|
||||
public void testMassRestore() throws Exception
|
||||
{
|
||||
nodeService.deleteNode(a);
|
||||
|
Reference in New Issue
Block a user