Compare commits

...

14 Commits

Author SHA1 Message Date
alfresco-build
6a527068dc [maven-release-plugin][skip ci] prepare release 23.1.0.142 2023-06-21 14:01:19 +00:00
Krystian Dabrowski
a45c04679f ACS-5409: ATS components version bump (#2012) 2023-06-21 14:16:30 +02:00
alfresco-build
43f1100040 [maven-release-plugin][skip ci] prepare for next development iteration 2023-06-18 00:06:31 +00:00
alfresco-build
8bade25669 [maven-release-plugin][skip ci] prepare release 23.1.0.141 2023-06-18 00:06:29 +00:00
Alfresco CI User
1e6e87f24a [force] Force release for 2023-06-18. 2023-06-18 00:03:20 +00:00
alfresco-build
3bcef29c30 [maven-release-plugin][skip ci] prepare for next development iteration 2023-06-16 15:14:20 +00:00
alfresco-build
fb98bb09f0 [maven-release-plugin][skip ci] prepare release 23.1.0.140 2023-06-16 15:14:17 +00:00
Tom Page
ad723a700a Merge pull request #1807 from Alfresco/feature/APPS-1593_ImproveAGSRESTTestReporting
APPS-1593 Try to make REST test failure messages more useful. [ags]
2023-06-16 15:31:12 +01:00
alfresco-build
1bc5bed838 [maven-release-plugin][skip ci] prepare for next development iteration 2023-06-16 13:03:21 +00:00
alfresco-build
beaf83a008 [maven-release-plugin][skip ci] prepare release 23.1.0.139 2023-06-16 13:03:18 +00:00
pzurek
8734eec068 Trigger CI 2023-06-16 14:13:35 +02:00
alfresco-build
1e506659d2 [maven-release-plugin][skip ci] prepare for next development iteration 2023-06-15 16:00:17 +00:00
Tom Page
653f733887 APPS-1593 Only load the response content if we need it. 2023-03-16 14:07:39 +00:00
Tom Page
623782dc97 APPS-1593 Try to make REST test failure messages more useful. [ags] 2023-03-16 11:34:46 +00:00
25 changed files with 60 additions and 40 deletions

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<build>

View File

@@ -512,7 +512,12 @@ public abstract class BaseAPI
try
{
HttpResponse httpResponse = doRequestJson(HttpPost.class, requestUrl, adminUser, adminPassword, requestParams);
assertEquals("POST request to " + requestUrl + " was not successful.", expectedStatusCode, httpResponse.getStatusLine().getStatusCode());
if (httpResponse.getStatusLine().getStatusCode() != expectedStatusCode)
{
// It's only possible to stream the response body once, so ensure we only do this if the test has failed.
JSONObject responseJson = responseBodyToJson(httpResponse);
assertEquals("POST request to " + requestUrl + " was not successful. Response: " + responseJson, expectedStatusCode, httpResponse.getStatusLine().getStatusCode());
}
return httpResponse;
}
catch (InstantiationException | IllegalAccessException error)
@@ -521,6 +526,32 @@ public abstract class BaseAPI
}
}
/**
* Try to convert the response body to a JSON object.
*
* @param response The response.
* @return The JSON object or null if it was not possible to convert the response.
*/
private JSONObject responseBodyToJson(HttpResponse response)
{
try
{
try
{
return new JSONObject(EntityUtils.toString(response.getEntity()));
}
catch (JSONException error)
{
LOGGER.error("Converting message body to JSON failed. Body: {}", response.getEntity().getContent(), error);
}
}
catch (ParseException | IOException error)
{
LOGGER.error("Parsing message body failed.", error);
}
return null;
}
/**
* Helper method for handling generic HTTP requests
* @param requestType request type (a subclass of {@link HttpRequestBase})
@@ -558,18 +589,7 @@ public abstract class BaseAPI
HttpResponse response = client.execute(adminUser, adminPassword, request);
LOGGER.info("Response: {}", response.getStatusLine());
try
{
responseBody = new JSONObject(EntityUtils.toString(response.getEntity()));
}
catch (JSONException error)
{
LOGGER.error("Converting message body to JSON failed. Body: {}", responseBody, error);
}
catch (ParseException | IOException error)
{
LOGGER.error("Parsing message body failed.", error);
}
responseBody = responseBodyToJson(response);
switch (response.getStatusLine().getStatusCode())
{

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<build>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<dependencies>

View File

@@ -9,6 +9,6 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
</project>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<modules>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<organization>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<developers>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<properties>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<developers>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<properties>

View File

@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
<packaging>pom</packaging>
<name>Alfresco Community Repo Parent</name>
@@ -51,8 +51,8 @@
<dependency.alfresco-server-root.version>6.0.1</dependency.alfresco-server-root.version>
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
<dependency.activiti.version>5.23.0</dependency.activiti.version>
<dependency.alfresco-transform-service.version>2.2.0-A1</dependency.alfresco-transform-service.version>
<dependency.alfresco-transform-core.version>3.2.0-A1</dependency.alfresco-transform-core.version>
<dependency.alfresco-transform-service.version>3.0.0-A1</dependency.alfresco-transform-service.version>
<dependency.alfresco-transform-core.version>4.0.0-A1</dependency.alfresco-transform-core.version>
<dependency.alfresco-greenmail.version>6.9</dependency.alfresco-greenmail.version>
<dependency.acs-event-model.version>0.0.22</dependency.acs-event-model.version>
@@ -149,7 +149,7 @@
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-community-repo</url>
<tag>23.1.0.138</tag>
<tag>23.1.0.142</tag>
</scm>
<distributionManagement>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.138</version>
<version>23.1.0.142</version>
</parent>
<dependencies>