Compare commits

...

36 Commits

Author SHA1 Message Date
Travis CI User
8155132d69 [maven-release-plugin][skip ci] prepare release v1.22 2019-12-11 22:41:25 +00:00
dependabot-preview[bot]
d0e94e0d68 Bump httpclient-osgi from 4.5.3 to 4.5.10 (#21) 2019-12-11 22:33:19 +00:00
Travis CI User
5c50dbef83 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-11 14:41:31 +00:00
Travis CI User
ef6d2531fb [maven-release-plugin][skip ci] prepare release v1.21 2019-12-11 14:41:25 +00:00
David Edwards
0c3c584ed9 Revert rest-assured 2019-12-11 14:37:37 +00:00
David Edwards
516d15796f REPO-4739 Update Rest-assured and httpclient-osgi
Rest-assured to 4.1.2 (newest version)
httpclient-osgi 4.5.3 (dependency of rest-assured)
2019-12-11 14:32:33 +00:00
Travis CI User
c2a2541a62 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-04 22:50:02 +00:00
Travis CI User
397979a4f9 [maven-release-plugin][skip ci] prepare release v1.20 2019-12-04 22:49:56 +00:00
dependabot-preview[bot]
ec85dd7e61 Bump utility from 3.0.15 to 3.0.16 (#20) 2019-12-04 22:19:25 +00:00
Travis CI User
69ccd06cf2 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-03 12:08:15 +00:00
Travis CI User
6002440be5 [maven-release-plugin][skip ci] prepare release v1.19 2019-12-03 12:08:09 +00:00
Tom Page
1973a9d578 Add some javadoc to explain the type of totalItems. 2019-12-03 12:03:45 +00:00
Travis CI User
8d1e16e9c2 [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-30 00:09:40 +00:00
Travis CI User
9e0b26f612 [maven-release-plugin][skip ci] prepare release v1.18 2019-11-30 00:09:34 +00:00
dependabot-preview[bot]
9080d3e0d9 Bump utility from 3.0.8 to 3.0.15 (#19) 2019-11-29 23:02:25 +00:00
Travis CI User
f916a625d0 [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-29 14:44:37 +00:00
Travis CI User
e0c278e277 [maven-release-plugin][skip ci] prepare release v1.17 2019-11-29 14:44:31 +00:00
dependabot-preview[bot]
bb64b05534 Bump commons-lang3 from 3.8 to 3.9 (#15) 2019-11-29 14:36:27 +00:00
dependabot-preview[bot]
28be182040 Bump groovy from 2.5.5 to 2.5.8 (#16) 2019-11-29 14:34:25 +00:00
dependabot-preview[bot]
ee88b0bf0c Bump scribejava-apis from 6.5.1 to 6.9.0 (#14) 2019-11-29 14:33:01 +00:00
dependabot-preview[bot]
cd60067bbf Bump servlet-api from 2.4 to 2.5 (#13) 2019-11-29 14:31:42 +00:00
dependabot-preview[bot]
bd64391527 Bump javax.json from 1.0.4 to 1.1.4 (#11) 2019-11-29 14:31:38 +00:00
dependabot-preview[bot]
126ece3dbe Bump groovy-json from 2.5.5 to 2.5.8 (#12) 2019-11-29 14:31:32 +00:00
dependabot-preview[bot]
f7b7eeaf56 Bump slf4j-api from 1.7.2 to 1.7.29 (#8) 2019-11-29 14:29:58 +00:00
dependabot-preview[bot]
53937c963c Bump httpclient-osgi from 4.5.2 to 4.5.10 (#6) 2019-11-29 14:29:49 +00:00
Travis CI User
671116b500 [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-29 11:00:11 +00:00
Travis CI User
82369a3dcf [maven-release-plugin][skip ci] prepare release v1.16 2019-11-29 11:00:05 +00:00
Alex Mukha
9e9caec601 Decrease wait time for activity feed requests 2019-11-29 10:56:10 +00:00
Travis CI User
27caf48c79 [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-15 16:55:22 +00:00
Travis CI User
e1b1e66e8d [maven-release-plugin][skip ci] prepare release v1.15 2019-11-15 16:55:15 +00:00
Alex Mukha
9186cead13 Move demo tests to test folder 2019-11-15 16:51:16 +00:00
Travis CI User
6c2d084209 [maven-release-plugin][skip ci] prepare for next development iteration 2019-10-17 17:07:43 +00:00
Travis CI User
81e0cb939d [maven-release-plugin][skip ci] prepare release v1.14 2019-10-17 17:07:38 +00:00
Alex Mukha
2bd64e48b5 REPO-4705: Allow to reconfigure server URI in RestWrapper 2019-10-17 18:03:20 +01:00
Alex Mukha
3d6c34c8d6 Revert "REPO-4705: Allow to reconfigure server URI (#2)"
This reverts commit 3c818df7f1.
2019-10-17 16:57:57 +01:00
Travis CI User
506dd32b31 [maven-release-plugin][skip ci] prepare for next development iteration 2019-10-16 10:44:44 +00:00
11 changed files with 66 additions and 36 deletions

View File

@@ -22,7 +22,7 @@ jobs:
include:
- stage: test
name: "Build and test"
script: travis_retry mvn test
script: travis_retry mvn test -Dtest=ModelAssertionTest
- stage: release
name: "Push to Nexus"
if: fork = false AND branch = master AND type != pull_request AND commit_message !~ /\[no-release\]/

View File

@@ -4,7 +4,7 @@
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi</artifactId>
<name>alfresco-tas-restapi</name>
<version>1.13</version>
<version>1.22</version>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-super-pom</artifactId>
@@ -28,17 +28,17 @@
<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>3.0.8</tas.utility.version>
<tas.utility.version>3.0.16</tas.utility.version>
<rest-assured.version>3.3.0</rest-assured.version>
<httpclient-osgi-version>4.5.2</httpclient-osgi-version>
<httpclient-osgi-version>4.5.10</httpclient-osgi-version>
<json-path.version>3.3.0</json-path.version>
<xml-path.version>3.3.0</xml-path.version>
<json-schema-validator.version>3.3.0</json-schema-validator.version>
<jackson-databind.version>2.9.8</jackson-databind.version>
<maven-release.version>2.5.3</maven-release.version>
<org.glassfish.version>1.0.4</org.glassfish.version>
<commons-lang3.version>3.8</commons-lang3.version>
<scribejava-apis.version>6.5.1</scribejava-apis.version>
<org.glassfish.version>1.1.4</org.glassfish.version>
<commons-lang3.version>3.9</commons-lang3.version>
<scribejava-apis.version>6.9.0</scribejava-apis.version>
<test.exclude />
<test.include />
<java.version>11</java.version>
@@ -48,7 +48,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.13</tag>
<tag>v1.22</tag>
</scm>
<issueManagement>
@@ -157,7 +157,7 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<version>2.5</version>
<scope>provided</scope>
</dependency>
@@ -255,7 +255,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.2</version>
<version>1.7.29</version>
</dependency>
<!-- swagger parser -->
@@ -282,14 +282,14 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>2.5.5</version>
<version>2.5.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-json</artifactId>
<version>2.5.5</version>
<version>2.5.8</version>
</dependency>
</dependencies>

View File

@@ -96,6 +96,23 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
private RequestSpecBuilder requestSpecBuilder = new RequestSpecBuilder();
private Headers responseHeaders;
private RestResponse response;
private String serverURI;
private int serverPort;
/**
* After configuring {@link #setServerURI(String)} and {@link #setServerPort(int)} call {@link #configureServerEndpoint()}
*
* @param serverURI in format of "http://localhost", without port. Set port via {@link #setServerPort(int)}
*/
public void setServerURI(String serverURI)
{
this.serverURI = serverURI;
}
public void setServerPort(int serverPort)
{
this.serverPort = serverPort;
}
@Autowired
private RestAisAuthentication aisAuthentication;
@@ -131,10 +148,9 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
@PostConstruct
public void initializeRequestSpecBuilder()
{
requestSpecBuilder = new RequestSpecBuilder();
configureServerEndpoint(
restProperties.envProperty().getTestServerUrl(),
restProperties.envProperty().getPort());
this.serverURI = restProperties.envProperty().getTestServerUrl();
this.serverPort = restProperties.envProperty().getPort();
configureServerEndpoint();
}
/**
@@ -616,7 +632,7 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
logResponseInformation(restRequest, returnedResponse);
initializeRequestSpecBuilder();
configureServerEndpoint();
response = new RestResponse(returnedResponse);
return returnedResponse;
}
@@ -1091,26 +1107,31 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
public void configureSyncServiceEndPoint()
{
configureServerEndpoint(
restProperties.envProperty().getSyncServerUrl(),
restProperties.envProperty().getSyncPort());
this.serverURI = restProperties.envProperty().getSyncServerUrl();
this.serverPort = restProperties.envProperty().getSyncPort();
configureServerEndpoint();
}
public void configureSolrEndPoint()
{
configureServerEndpoint(
restProperties.envProperty().getSolrServerUrl(),
restProperties.envProperty().getSolrPort());
this.serverURI = restProperties.envProperty().getSolrServerUrl();
this.serverPort = restProperties.envProperty().getSolrPort();
configureServerEndpoint();
}
/**
* @param baseURI String of format http://127.0.0.1 without port
* Use {@link #setServerURI(String)} and {@link #setServerPort(int)}
*/
public void configureServerEndpoint(String baseURI, int port)
public void configureServerEndpoint()
{
RestAssured.baseURI = baseURI;
RestAssured.port = port;
configureRequestSpec().setBaseUri(baseURI);
configureRequestSpec().setPort(port);
requestSpecBuilder = new RequestSpecBuilder();
// use static variables for logs, etc
// the request spec is built from data set via setters, see RestWrapper#onRequest
RestAssured.baseURI = this.serverURI;
RestAssured.port = this.serverPort;
configureRequestSpec().setBaseUri(this.serverURI);
configureRequestSpec().setPort(this.serverPort);
}
}

View File

@@ -20,6 +20,10 @@ public class RestPaginationModel extends TestModel implements IModelAssertion<Re
{
private int count;
private boolean hasMoreItems;
/**
* {code}totalItems{code} is optional and some endpoints don't include it e.g. GET sites/{siteId}/members
* See the section entitled "The list object" in https://ts.alfresco.com/share/page/site/prodman/document-details?nodeRef=workspace://SpacesStore/17eacc65-28e5-40bb-8113-edb8c21d57a5
*/
private Integer totalItems;
private int skipCount;
private int maxItems;
@@ -44,6 +48,11 @@ public class RestPaginationModel extends TestModel implements IModelAssertion<Re
this.hasMoreItems = hasMoreItems;
}
/**
* Get the totalItems.
*
* @return The total number of items, or null if it was not included in the response.
*/
public Integer getTotalItems()
{
return totalItems;
@@ -75,14 +84,14 @@ public class RestPaginationModel extends TestModel implements IModelAssertion<Re
}
@Override
public ModelAssertion<RestPaginationModel> assertThat()
public ModelAssertion<RestPaginationModel> assertThat()
{
return new ModelAssertion<RestPaginationModel>(this);
}
return new ModelAssertion<>(this);
}
@Override
public ModelAssertion<RestPaginationModel> and()
public ModelAssertion<RestPaginationModel> and()
{
return assertThat();
}
}
}

View File

@@ -85,7 +85,7 @@ public class People extends ModelRequest<People>
{
while ((activityCollection.isEmpty() || activityCollection.getPagination().getCount() != expectedNoOfEntries) && retry < Utility.retryCountSeconds + 20)
{
Utility.waitToLoopTime(2);
Thread.sleep(300);
activityCollection = restWrapper.processModels(RestActivityModelsCollection.class, request);
retry++;
}