Merged API-STRIKES-BACK (5.2.0) to HEAD (5.2)

125514 jvonka: RA-779 / RA-780: Sites API - create site & delete site
   - fix delete/remove test status code
   - note: also put back previous rendition status codes (=> raise separate local vs build issue)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127532 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-06-02 21:18:41 +00:00
parent aff9bd8941
commit fe2d166702
2 changed files with 3 additions and 3 deletions

View File

@@ -294,7 +294,7 @@ public class RenditionsTest extends AbstractBaseApiTest
// Create a node without any content // Create a node without any content
String emptyContentNodeId = addToDocumentLibrary(userOneN1Site, "emptyDoc.txt", TYPE_CM_CONTENT, userOneN1.getId()); String emptyContentNodeId = addToDocumentLibrary(userOneN1Site, "emptyDoc.txt", TYPE_CM_CONTENT, userOneN1.getId());
getSingle(getNodeRenditionsUrl(emptyContentNodeId), userOneN1.getId(), "doclib", 200); getSingle(getNodeRenditionsUrl(emptyContentNodeId), userOneN1.getId(), "doclib", 404); // TODO different results local (200) than build (404) ?
// Create multipart request // Create multipart request
String jpgFileName = "quick.jpg"; String jpgFileName = "quick.jpg";
@@ -408,7 +408,7 @@ public class RenditionsTest extends AbstractBaseApiTest
// The source node has no content // The source node has no content
request = new ArrayList<>(2); request = new ArrayList<>(2);
request.add(new Rendition().setId("doclib")); request.add(new Rendition().setId("doclib"));
post(getNodeRenditionsUrl(emptyContentNodeId), userOneN1.getId(), toJsonAsString(renditionRequest), 202); post(getNodeRenditionsUrl(emptyContentNodeId), userOneN1.getId(), toJsonAsString(renditionRequest), 400); // TODO different results local (202) than build (400) ?
String content = "The quick brown fox jumps over the lazy dog."; String content = "The quick brown fox jumps over the lazy dog.";
file = TempFileProvider.createTempFile(new ByteArrayInputStream(content.getBytes()), getClass().getSimpleName(), ".bin"); file = TempFileProvider.createTempFile(new ByteArrayInputStream(content.getBytes()), getClass().getSimpleName(), ".bin");

View File

@@ -737,7 +737,7 @@ public class PublicApiClient
public HttpResponse remove(String entityCollectionName, String entityId, String relationCollectionName, String relationId, String errorMessage) throws PublicApiException public HttpResponse remove(String entityCollectionName, String entityId, String relationCollectionName, String relationId, String errorMessage) throws PublicApiException
{ {
return remove(entityCollectionName, entityId, relationCollectionName, relationId, errorMessage, HttpServletResponse.SC_GONE); return remove(entityCollectionName, entityId, relationCollectionName, relationId, errorMessage, HttpServletResponse.SC_NO_CONTENT);
} }
public HttpResponse remove(String entityCollectionName, String entityId, String relationCollectionName, String relationId, String errorMessage, int expectedStatus) throws PublicApiException public HttpResponse remove(String entityCollectionName, String entityId, String relationCollectionName, String relationId, String errorMessage, int expectedStatus) throws PublicApiException