Merged 5.2.N (5.2.1) to HEAD (5.2)

129790 jvonka: REPO-164 / REPO-1141: fix error mapping when unable to update content due to locked node (should be 409 not 500)
   - also minor cleanup of error handling/mapping (handle within common "writeContent")


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130230 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-09-06 14:43:25 +00:00
parent 2e47b0cce2
commit 65f1f05d1f
4 changed files with 68 additions and 38 deletions

View File

@@ -3631,6 +3631,8 @@ public class NodeApiTest extends AbstractSingleNetworkSiteTest
// Test delete on a folder which contains a locked node - NodeLockedException
deleteNode(folderId, true, HttpStatus.SC_CONFLICT);
updateTextFile(d1Id, "Updated text", null, 409);
// Test lock children
// create folder
String folderAName = "folder" + RUNID + "_A";
@@ -3683,6 +3685,9 @@ public class NodeApiTest extends AbstractSingleNetworkSiteTest
assertNotNull(child.getProperties().get("cm:lockType"));
assertNotNull(child.getProperties().get("cm:lockOwner"));
assertTrue(child.getIsLocked());
// note: these can be updated by the owner since the lock type is "ALLOW_OWNER_CHANGES"
updateTextFile(child.getId(), "Updated text", null, 200);
}
// Lock body properties - boundary values