[feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

This commit is contained in:
Mohit Singh
2024-07-31 13:05:09 +05:30
parent 044b05481f
commit b88af161c8

View File

@@ -153,8 +153,14 @@ public class NodeFolderSizeApiTest extends AbstractBaseApiTest
{ {
AuthenticationUtil.setFullyAuthenticatedUser(user1); 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 // 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()); String jsonResponse = String.valueOf(response.getJsonResponse());
assertNotNull("JSON response should not be null", jsonResponse); assertNotNull("JSON response should not be null", jsonResponse);