Skip to content

Commit

Permalink
[fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case f…
Browse files Browse the repository at this point in the history
…or calculating the NodeSize.
  • Loading branch information
mohit-singh4 committed Nov 12, 2024
1 parent 2cbc0fb commit 62bf9ba
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package org.alfresco.rest.nodes;

import org.alfresco.rest.model.RestNodeModel;
import org.alfresco.rest.model.RestSizeDetailsModel;
import org.alfresco.utility.Utility;
import org.alfresco.utility.model.*;
import static org.alfresco.utility.report.log.Step.STEP;

import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.IntStream;

import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.http.HttpStatus;
import org.testng.Assert;
Expand All @@ -13,14 +14,13 @@

import org.alfresco.dataprep.CMISUtil.DocumentType;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.model.RestNodeModel;
import org.alfresco.rest.model.RestSizeDetailsModel;
import org.alfresco.utility.Utility;
import org.alfresco.utility.model.*;
import org.alfresco.utility.testrail.ExecutionType;
import org.alfresco.utility.testrail.annotation.TestRail;

import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.IntStream;

import static org.alfresco.utility.report.log.Step.STEP;

public class NodeSizeDetailsTests extends RestTest
{
private UserModel user1;
Expand All @@ -36,7 +36,6 @@ public void dataPreparation()
}

/**
*
* Unauthenticated user not able to execute POST /nodes/{nodeId}/size-details: 401 STATUS CODE
*/

Expand Down Expand Up @@ -146,10 +145,10 @@ public void calculateNodeSizeForMultipleFiles() throws InterruptedException

restClient.assertStatusCodeIs(HttpStatus.OK);
sizeDetailsModel.assertThat().field("sizeInBytes").isNotEmpty();
Assert.assertEquals(sizeDetailsModel.getSizeInBytes(),fileSize.get(),"Value of sizeInBytes " + sizeDetailsModel.getSizeInBytes() + " is not equal to " + fileSize);
Assert.assertEquals(sizeDetailsModel.getSizeInBytes(), fileSize.get(), "Value of sizeInBytes " + sizeDetailsModel.getSizeInBytes() + " is not equal to " + fileSize);
}

@AfterClass(alwaysRun=true)
@AfterClass(alwaysRun = true)
public void cleanup() throws Exception
{
dataSite.usingAdmin().deleteSite(siteModel);
Expand Down

0 comments on commit 62bf9ba

Please sign in to comment.