Compare commits

..

12 Commits

Author SHA1 Message Date
Travis CI User
918d5575ca [maven-release-plugin][skip ci] prepare release v1.5 2019-06-05 10:07:59 +00:00
Travis CI User
3c7b48d95c [maven-release-plugin][skip ci] prepare for next development iteration 2019-06-03 13:45:15 +00:00
Travis CI User
85635663a2 [maven-release-plugin][skip ci] prepare release v1.4 2019-06-03 13:45:07 +00:00
Alex Mukha
46d42c0910 Prepare for next release 2019-06-03 14:36:25 +01:00
Alex Mukha
5cd309d5ff [ci skip] Add skip release in Travis 2019-06-03 14:27:47 +01:00
Alex Mukha
5b5c3ee584 Update tas-utility version to 2.0.25 2019-06-03 14:25:12 +01:00
Alex Mukha
ee3513ddc8 REPO-4250: REST API: Refactor TAS RESTAPI tests to not use CMIS
- cherry-pick cd78b750c22f908e962362d9e7ebc754d206e203 from release/5.2.x to master
2019-06-03 14:23:15 +01:00
Travis CI User
98d90b8008 [maven-release-plugin][skip ci] prepare for next development iteration 2019-05-29 10:05:02 +00:00
Travis CI User
1847b4e3b0 [maven-release-plugin][skip ci] prepare release v1.3 2019-05-29 10:04:57 +00:00
Travis CI User
81dfbe0baf [maven-release-plugin][skip ci] prepare for next development iteration 2019-05-22 10:05:23 +00:00
Travis CI User
068eb23f88 [maven-release-plugin][skip ci] prepare release v1.2 2019-05-22 10:05:18 +00:00
Travis CI User
344caf4904 [maven-release-plugin][skip ci] prepare for next development iteration 2019-05-15 16:15:23 +00:00
3 changed files with 27 additions and 28 deletions

View File

@@ -25,7 +25,7 @@ jobs:
script: travis_retry mvn test
- stage: release
name: "Push to Nexus"
if: fork = false AND branch = master AND type != pull_request
if: fork = false AND branch = master AND type != pull_request AND commit_message !~ /\[no-release\]/
before_install:
- "cp .travis.settings.xml $HOME/.m2/settings.xml"
script:

View File

@@ -4,7 +4,7 @@
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi</artifactId>
<name>alfresco-tas-restapi</name>
<version>1.1</version>
<version>1.5</version>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-super-pom</artifactId>
@@ -28,7 +28,7 @@
<suiteXmlFile>src/main/resources/shared-resources/testCount.xml</suiteXmlFile>
<maven.build.sourceVersion>11</maven.build.sourceVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tas.utility.version>2.0.22</tas.utility.version>
<tas.utility.version>2.0.25</tas.utility.version>
<rest-assured.version>3.3.0</rest-assured.version>
<httpclient-osgi-version>4.5.2</httpclient-osgi-version>
<json-path.version>3.3.0</json-path.version>
@@ -50,7 +50,7 @@
<connection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-tas-restapi</url>
<tag>v1.1</tag>
<tag>v1.5</tag>
</scm>
<issueManagement>

View File

@@ -1,34 +1,13 @@
package org.alfresco.rest.requests;
import java.io.File;
import javax.json.JsonArrayBuilder;
import io.restassured.http.ContentType;
import org.alfresco.rest.core.JsonBodyGenerator;
import org.alfresco.rest.core.RestRequest;
import org.alfresco.rest.core.RestResponse;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.exception.JsonToModelConversionException;
import org.alfresco.rest.model.RestActionDefinitionModelsCollection;
import org.alfresco.rest.model.RestCommentModel;
import org.alfresco.rest.model.RestCommentModelsCollection;
import org.alfresco.rest.model.RestNodeAssocTargetModel;
import org.alfresco.rest.model.RestNodeAssociationModel;
import org.alfresco.rest.model.RestNodeAssociationModelCollection;
import org.alfresco.rest.model.RestNodeBodyModel;
import org.alfresco.rest.model.RestNodeBodyMoveCopyModel;
import org.alfresco.rest.model.RestNodeChildAssocModelCollection;
import org.alfresco.rest.model.RestNodeModel;
import org.alfresco.rest.model.RestNodeModelsCollection;
import org.alfresco.rest.model.RestRatingModel;
import org.alfresco.rest.model.RestRatingModelsCollection;
import org.alfresco.rest.model.RestRenditionInfoModel;
import org.alfresco.rest.model.RestRenditionInfoModelCollection;
import org.alfresco.rest.model.RestTagModel;
import org.alfresco.rest.model.RestTagModelsCollection;
import org.alfresco.rest.model.RestVersionModel;
import org.alfresco.rest.model.RestVersionModelsCollection;
import org.alfresco.rest.model.*;
import org.alfresco.rest.model.body.RestNodeLockBodyModel;
import org.alfresco.rest.model.builder.NodesBuilder;
import org.alfresco.utility.Utility;
@@ -37,7 +16,8 @@ import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.testng.reporters.Files;
import io.restassured.http.ContentType;
import javax.json.JsonArrayBuilder;
import java.io.File;
/**
* Declares all Rest API under the /nodes path
@@ -391,6 +371,25 @@ public class Node extends ModelRequest<Node>
restWrapper.processEmptyModel(request);
}
/**
* Check if specified rendition exists and if not
* create node rendition using POST call on '/nodes/{nodeId}/renditions'
*
* @param renditionId id of rendition to be created
* @return
* @throws Exception
*/
public void createNodeRenditionIfNotExists(String renditionId) throws Exception
{
getNodeRendition(renditionId);
if (HttpStatus.OK.toString().equals(restWrapper.getStatusCode()))
{
String postBody = JsonBodyGenerator.keyValueJson("id", renditionId);
RestRequest request = RestRequest.requestWithBody(HttpMethod.POST, postBody, "nodes/{nodeId}/renditions", repoModel.getNodeRef());
restWrapper.processEmptyModel(request);
}
}
/**
* Get node rendition using GET call on '/nodes/{nodeId}/renditions/{renditionId}
*