[feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

This commit is contained in:
mohit-singh4
2024-08-23 02:54:35 +05:30
parent 16f93add09
commit 29d17ece20

View File

@@ -204,14 +204,20 @@ public class NodeSizeDetailsTest extends AbstractBaseApiTest
setRequestContext(user1);
// Create a folder within the site document's library.
String folderName = "nestedFolder" + System.currentTimeMillis();
String fileName = "dummyContent.txt";
String nestedFolderId = addToDocumentLibrary(userOneN1Site, folderName, TYPE_CM_CONTENT);
Document d1 = new Document();
d1.setIsFolder(false);
d1.setParentId(nestedFolderId);
d1.setName(fileName);
d1.setNodeType(TYPE_CM_CONTENT);
Map<String, String> params = new HashMap<>();
params.put("nodeId", folderId);
params.put("maxItems", "1000");
params.put("nodeId", nestedFolderId);
// Perform POST request
HttpResponse responseForInvalidNode = post(getCalculateFolderSizeUrl(nestedFolderId), toJsonAsStringNonNull(params), 422);
HttpResponse responseForInvalidNode = post(getCalculateFolderSizeUrl(d1.getId()), toJsonAsStringNonNull(d1), 422);
assertNotNull(responseForInvalidNode);
}