mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-01 14:41:46 +00:00
[feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size
This commit is contained in:
@@ -106,6 +106,7 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
|
||||
private static final String URL_CHILDREN = "children";
|
||||
private static final String URL_CONTENT = "content";
|
||||
private static final String URL_CALCULATEFOLDERSIZE = "calculate-folder-size";
|
||||
private static final String URL_GETFOLDERSIZE = "get-folder-size";
|
||||
|
||||
protected static final String TYPE_CM_FOLDER = "cm:folder";
|
||||
protected static final String TYPE_CM_CONTENT = "cm:content";
|
||||
@@ -1126,5 +1127,9 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
|
||||
{
|
||||
return URL_NODES + "/" + nodeId + "/" + URL_CALCULATEFOLDERSIZE;
|
||||
}
|
||||
protected String getFolderSizeDataUrl(String nodeId)
|
||||
{
|
||||
return URL_NODES + "/" + nodeId + "/" + URL_GETFOLDERSIZE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -140,7 +140,7 @@ public class NodeFolderSizeApiTest extends AbstractBaseApiTest
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(user1);
|
||||
|
||||
// Check if response and JSON parsing were successful
|
||||
HttpResponse response = getSingle(NodesEntityResource.class, folderId+"/get-folder-size", null, 200);
|
||||
HttpResponse response = putBinary(getFolderSizeDataUrl(folderId), null, null, null, 200);
|
||||
|
||||
String jsonResponse = String.valueOf(response.getJsonResponse());
|
||||
assertNotNull("JSON response should not be null", jsonResponse);
|
||||
|
Reference in New Issue
Block a user