mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-01 14:41:46 +00:00
[feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details
This commit is contained in:
@@ -50,11 +50,9 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.alfresco.rest.api.tests.util.RestApiUtil.toJsonAsStringNonNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
/**
|
||||
* V1 REST API tests for calculating and retrieving Folder size.
|
||||
@@ -136,7 +134,7 @@ public class NodeSizeDetailsTest extends AbstractBaseApiTest
|
||||
params.put("nodeId", folderId);
|
||||
params.put("jobId", jobId);
|
||||
|
||||
HttpResponse getResponse = get(getNodeSizeDetailsUrl(folderId, jobId), params, 200);
|
||||
HttpResponse getResponse = getSingle(getNodeSizeDetailsUrl(folderId, jobId), user1, params, 200);
|
||||
|
||||
assertNotNull("After executing GET/size-details, it will provide NodeSizeDetails with 200 status code",getResponse.getJsonResponse());
|
||||
|
||||
@@ -180,7 +178,7 @@ public class NodeSizeDetailsTest extends AbstractBaseApiTest
|
||||
// Perform POST request
|
||||
HttpResponse postResponse = post(generateNodeSizeDetailsUrl(parentFolder), null, 202);
|
||||
|
||||
assertNull("After executing POST/size-details first time, it will provide jobId with 202 status code",postResponse.getJsonResponse());
|
||||
assertNotNull("After executing POST/size-details first time, it will provide jobId with 202 status code",postResponse.getJsonResponse());
|
||||
|
||||
String jobId = NodeSizeDetails.parseJson((JSONObject)postResponse.getJsonResponse().get("entry"));
|
||||
|
||||
@@ -191,7 +189,7 @@ public class NodeSizeDetailsTest extends AbstractBaseApiTest
|
||||
params.put("nodeId", folderId);
|
||||
params.put("jobId", jobId);
|
||||
|
||||
HttpResponse getResponse = get(getNodeSizeDetailsUrl(folderId, jobId), params, 200);
|
||||
HttpResponse getResponse = getSingle(getNodeSizeDetailsUrl(folderId, jobId), user1, params, 200);
|
||||
|
||||
assertNotNull("After executing GET/size-details, it will provide NodeSizeDetails with 200 status code",getResponse.getJsonResponse());
|
||||
|
||||
|
Reference in New Issue
Block a user