diff --git a/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/renditions/RenditionIntegrationTests.java b/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/renditions/RenditionIntegrationTests.java index dc28448417..78a6462f41 100644 --- a/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/renditions/RenditionIntegrationTests.java +++ b/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/renditions/RenditionIntegrationTests.java @@ -7,9 +7,7 @@ import org.alfresco.utility.Utility; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.FolderModel; import org.alfresco.utility.model.SiteModel; - import org.alfresco.utility.model.UserModel; - import org.springframework.http.HttpStatus; import org.testng.Assert; import org.testng.annotations.BeforeClass; @@ -40,17 +38,20 @@ public abstract class RenditionIntegrationTests extends RestTest FileModel file = new FileModel(); file.setNodeRef(nodeId); - // 1. Create a rendition of the file using RESTAPI + // 1. Preemptively delete an existing rendition of the file using RESTAPI + restClient.withCoreAPI().usingNode(file).deleteNodeRendition(renditionId); + + // 2. Create a rendition of the file using RESTAPI restClient.withCoreAPI().usingNode(file).createNodeRendition(renditionId); Assert.assertEquals(Integer.valueOf(restClient.getStatusCode()).intValue(), HttpStatus.ACCEPTED.value(), "Failed to submit a request for rendition. [" + fileName+ ", " + renditionId+"] [source file, rendition ID]. "); - // 2. Verify that a rendition of the file is created and has content using RESTAPI + // 3. Verify that a rendition of the file is created and has content using RESTAPI RestResponse restResponse = restClient.withCoreAPI().usingNode(file).getNodeRenditionContentUntilIsCreated(renditionId); Assert.assertEquals(Integer.valueOf(restClient.getStatusCode()).intValue(), HttpStatus.OK.value(), "Failed to produce rendition. [" + fileName+ ", " + renditionId+"] [source file, rendition ID] "); - // 3. Check the returned content type + // 4. Check the returned content type Assert.assertEquals(restClient.getResponseHeaders().getValue("Content-Type"), expectedMimeType+";charset=UTF-8", "Rendition was created but it has the wrong Content-Type. [" + fileName+ ", " + renditionId + "] [source file, rendition ID]"); diff --git a/pom.xml b/pom.xml index 5872532c05..a581c51447 100644 --- a/pom.xml +++ b/pom.xml @@ -118,7 +118,7 @@ 2.7.4 3.0.47 3.3.0 - 1.79 + 1.80 1.31 1.8 1.6