[MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

This commit is contained in:
mohit-singh4
2024-06-27 10:41:36 +05:30
parent 9d9d5ee599
commit c3e03ca837
3 changed files with 25 additions and 8 deletions

View File

@@ -135,7 +135,6 @@ public class NodeFolderSizeRelation implements RelationshipResourceAction.Calcul
Map<String, Object> result = new HashMap<>();
resetFolderOutput.put("status","IN-PROGRESS");
nodeService.setProperty(nodeRef, FolderSizeModel.PROP_OUTPUT, (Serializable) resetFolderOutput);
nodeService.setProperty(nodeRef, FolderSizeModel.PROP_ERROR,null);
validatePermissions(nodeRef, nodeId);
@@ -164,8 +163,7 @@ public class NodeFolderSizeRelation implements RelationshipResourceAction.Calcul
@Override
@WebApiDescription(title = "Returns Folder Node Size", description = "Returning a Folder Node Size")
@WebApiParameters({
@WebApiParam(name = "nodeId", title = "The unique id of the Node being addressed", description = "A single node id")})
@WebApiParameters({@WebApiParam(name = "nodeId", title = "The unique id of the Node being addressed", description = "A single node id")})
public Map<String, Object> readById(String nodeId, String id, Parameters parameters)
{
NodeRef nodeRef = nodes.validateNode(nodeId);

View File

@@ -40,13 +40,17 @@ import org.junit.runners.MethodSorters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import static org.alfresco.rest.api.tests.util.RestApiUtil.toJsonAsStringNonNull;
import static org.junit.Assert.assertNotNull;
import javax.validation.constraints.AssertTrue;
/**
* V1 REST API tests for Folder size
*/