ACS-2498 Switch to using a configVersion parameter on the /transform/config endpoint (#530)

* Fixed the config returned by the AIO as it did not include the coreVersion even though the individual ones did.
This commit is contained in:
Alan Davis
2022-02-10 23:50:19 +00:00
committed by GitHub
parent df519cfd6f
commit a89e161004
15 changed files with 115 additions and 66 deletions

View File

@@ -26,6 +26,7 @@
*/
package org.alfresco.transformer;
import static org.alfresco.transform.client.util.RequestParamMap.ENDPOINT_TRANSFORM;
import static org.hamcrest.Matchers.containsString;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -221,7 +222,7 @@ public class AlfrescoPdfRendererControllerTest extends AbstractTransformerContro
expectedOptions = "--width=321 --height=654 --allow-enlargement --maintain-aspect-ratio --page=2";
mockMvc
.perform(MockMvcRequestBuilders
.multipart("/transform")
.multipart(ENDPOINT_TRANSFORM)
.file(sourceFile)
.param("targetExtension", targetExtension)
.param("targetMimetype", targetMimetype)
@@ -245,7 +246,7 @@ public class AlfrescoPdfRendererControllerTest extends AbstractTransformerContro
expectedOptions = "--width=321 --height=654 --page=2";
mockMvc
.perform(MockMvcRequestBuilders
.multipart("/transform")
.multipart(ENDPOINT_TRANSFORM)
.file(sourceFile)
.param("targetExtension", targetExtension)
.param("targetMimetype", targetMimetype)
@@ -277,7 +278,7 @@ public class AlfrescoPdfRendererControllerTest extends AbstractTransformerContro
{
when(mockExecutionResult.getExitValue()).thenReturn(1);
mockMvc.perform(mockMvcRequest("/transform", sourceFile, "targetExtension", "xxx"))
mockMvc.perform(mockMvcRequest(ENDPOINT_TRANSFORM, sourceFile, "targetExtension", "xxx"))
.andExpect(status().is(BAD_REQUEST.value()))
.andExpect(status()
.reason(containsString("Transformer exit code was not 0: \nSTDERR")));
@@ -311,7 +312,7 @@ public class AlfrescoPdfRendererControllerTest extends AbstractTransformerContro
String tr = objectMapper.writeValueAsString(transformRequest);
String transformationReplyAsString = mockMvc
.perform(MockMvcRequestBuilders
.post("/transform")
.post(ENDPOINT_TRANSFORM)
.header(ACCEPT, APPLICATION_JSON_VALUE)
.header(CONTENT_TYPE, APPLICATION_JSON_VALUE)
.content(tr))