From b88af161c86b13b5b92f5a9a658da5e19f14a5ae Mon Sep 17 00:00:00 2001 From: Mohit Singh Date: Wed, 31 Jul 2024 13:05:09 +0530 Subject: [PATCH] [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size --- .../alfresco/rest/api/tests/NodeFolderSizeApiTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/remote-api/src/test/java/org/alfresco/rest/api/tests/NodeFolderSizeApiTest.java b/remote-api/src/test/java/org/alfresco/rest/api/tests/NodeFolderSizeApiTest.java index 4591501f6c..0ac52d80e2 100644 --- a/remote-api/src/test/java/org/alfresco/rest/api/tests/NodeFolderSizeApiTest.java +++ b/remote-api/src/test/java/org/alfresco/rest/api/tests/NodeFolderSizeApiTest.java @@ -153,8 +153,14 @@ public class NodeFolderSizeApiTest extends AbstractBaseApiTest { AuthenticationUtil.setFullyAuthenticatedUser(user1); + String fileName = "demo.docx"; + File file = getResourceFile(fileName); + PublicApiHttpClient.BinaryPayload payload = new PublicApiHttpClient.BinaryPayload(file); + HttpResponse response = putBinary(getFolderSizeDataUrl(folderId), payload, null, null, 200); + assertNotNull(response); + // Check if response and JSON parsing were successful - HttpResponse response = getSingle(NodesEntityResource.class, folderId+"/get-folder-size", null, 200); + HttpResponse response2 = getSingle(getFolderSizeDataUrl(folderId), null, null, 200); String jsonResponse = String.valueOf(response.getJsonResponse()); assertNotNull("JSON response should not be null", jsonResponse);