[MGNLCE-79] Create integration tests for the rest services Created: 26/Nov/13 Updated: 10/Apr/17 Resolved: 07/Apr/17 |
|
| Status: | Closed |
| Project: | Community Edition |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.5.4 |
| Type: | Task | Priority: | Major |
| Reporter: | Daniel Lipp | Assignee: | Philip Mundt |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Template: |
|
||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||
| Task DoR: |
Empty
|
||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||
| Epic Link: | Improve QA setup | ||||||||||||||||||||
| Sprint: | Basel 89, Basel 90 | ||||||||||||||||||||
| Story Points: | 8 | ||||||||||||||||||||
| Description |
|
While the rest services have a good unit-test coverage we don't have any integration test that would verify it actually works as a whole. Note: when being tackled, this ticket might have to be moved to MAGNOLIA in JIRA |
| Comments |
| Comment by Philip Mundt [ 10/Dec/13 ] |
|
Currently, the rest module won't work in our test environment because of jetty 6 return wrong/multiple Content-Types. |
| Comment by Tobias Mattsson [ 13/Jan/14 ] |
|
Attaching MagnoliaRestClient.java, a simple client for using the REST API. It supports Basic HTTP authentication. Might be useful for integration tests. Its created and configured like this: restClient = new MagnoliaRestClient(); restClient.setHostname("localhost"); restClient.setPort(8080); restClient.setUsername("superuser"); restClient.setPassword("superuser"); restClient.setServiceBasePath(""); and then used like this:
if (restClient.nodeExists("website", "/test")) {
restClient.deleteNode("website", "/test");
}
RepositoryNode node = new RepositoryNode();
node.setName("test");
node.setType("mgnl:page");
restClient.createNode("website", "/", node);
node.getProperties().add(createProperty("title", "Changed title"));
restClient.updateNode("website", "/test", node);
|
| Comment by Michael Mühlebach [ 10/Mar/17 ] |
|
As seen with |