ALF-19690 "CMIS TCK Test Failures": fixed up failing TCK tests for 1.0 and 1.1 endpoints, refactoring of tests to aid in this aim, other fixes for things I found whilst testing, hopefully have addressed CLOUD-2051 too, upgrade alfresco-opencmis-extension (with updated chemistry dependency) to fix transitive dependency issue in maven

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55695 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Steven Glover
2013-09-19 16:35:41 +00:00
parent a9786e1c99
commit bdb6746670
24 changed files with 1410 additions and 1238 deletions

View File

@@ -18,34 +18,7 @@
*/
package org.alfresco.rest.api.tests;
import java.util.Map;
import org.alfresco.opencmis.OpenCMISClientContext;
import org.apache.chemistry.opencmis.tck.impl.AbstractSessionTestGroup;
import org.apache.chemistry.opencmis.tck.impl.JUnitHelper;
import org.apache.chemistry.opencmis.tck.tests.basics.BasicsTestGroup;
import org.apache.chemistry.opencmis.tck.tests.control.ControlTestGroup;
import org.apache.chemistry.opencmis.tck.tests.crud.BulkUpdatePropertiesTest;
import org.apache.chemistry.opencmis.tck.tests.crud.ContentRangesTest;
import org.apache.chemistry.opencmis.tck.tests.crud.CopyTest;
import org.apache.chemistry.opencmis.tck.tests.crud.CreateAndDeleteDocumentTest;
import org.apache.chemistry.opencmis.tck.tests.crud.CreateAndDeleteFolderTest;
import org.apache.chemistry.opencmis.tck.tests.crud.CreateAndDeleteItemTest;
import org.apache.chemistry.opencmis.tck.tests.crud.CreateAndDeleteRelationshipTest;
import org.apache.chemistry.opencmis.tck.tests.crud.CreateBigDocument;
import org.apache.chemistry.opencmis.tck.tests.crud.CreateDocumentWithoutContent;
import org.apache.chemistry.opencmis.tck.tests.crud.DeleteTreeTest;
import org.apache.chemistry.opencmis.tck.tests.crud.MoveTest;
import org.apache.chemistry.opencmis.tck.tests.crud.NameCharsetTest;
import org.apache.chemistry.opencmis.tck.tests.crud.SetAndDeleteContentTest;
import org.apache.chemistry.opencmis.tck.tests.filing.FilingTestGroup;
import org.apache.chemistry.opencmis.tck.tests.query.ContentChangesSmokeTest;
import org.apache.chemistry.opencmis.tck.tests.query.QueryLikeTest;
import org.apache.chemistry.opencmis.tck.tests.query.QuerySmokeTest;
import org.apache.chemistry.opencmis.tck.tests.versioning.CheckedOutTest;
import org.apache.chemistry.opencmis.tck.tests.versioning.VersionDeleteTest;
import org.apache.chemistry.opencmis.tck.tests.versioning.VersioningSmokeTest;
import org.junit.Test;
/**
* Base class for Chemistry OpenCMIS TCK tests.
@@ -56,120 +29,10 @@ import org.junit.Test;
public abstract class AbstractEnterpriseOpenCMISTCKTest extends EnterpriseTestApi
{
protected static OpenCMISClientContext clientContext;
@Test
public void testCMISTCKBasics() throws Exception
{
BasicsTestGroup basicsTestGroup = new BasicsTestGroup();
JUnitHelper.run(basicsTestGroup);
}
// @Test
public void testCMISTCKCRUD() throws Exception
{
OverrideCRUDTestGroup crudTestGroup = new OverrideCRUDTestGroup();
JUnitHelper.run(crudTestGroup);
}
// @Test
public void testCMISTCKVersioning() throws Exception
{
OverrideVersioningTestGroup versioningTestGroup = new OverrideVersioningTestGroup();
JUnitHelper.run(versioningTestGroup);
}
// @Test
public void testCMISTCKFiling() throws Exception
{
FilingTestGroup filingTestGroup = new FilingTestGroup();
JUnitHelper.run(filingTestGroup);
}
@Test
public void testCMISTCKControl() throws Exception
{
ControlTestGroup controlTestGroup = new ControlTestGroup();
JUnitHelper.run(controlTestGroup);
}
@Test
public void testCMISTCKQuery() throws Exception
{
OverrideQueryTestGroup queryTestGroup = new OverrideQueryTestGroup();
JUnitHelper.run(queryTestGroup);
}
class OverrideCRUDTestGroup extends AbstractSessionTestGroup
{
@Override
public void init(Map<String, String> parameters) throws Exception
{
super.init(parameters);
setName("CRUD Test Group");
setDescription("Create, Read, Update, and Delete tests.");
addTest(new CreateAndDeleteFolderTest());
addTest(new CreateAndDeleteDocumentTest());
addTest(new CreateBigDocument());
addTest(new CreateDocumentWithoutContent());
addTest(new NameCharsetTest());
addTest(new CreateAndDeleteRelationshipTest());
addTest(new CreateAndDeleteItemTest());
// changes to enable auto versioning have broken this test. Perhaps revert those changes and force the client
// to apply the autoVersioning aspect manually?
// addTest(new UpdateSmokeTest());
addTest(new BulkUpdatePropertiesTest());
addTest(new SetAndDeleteContentTest());
addTest(new ContentRangesTest());
addTest(new CopyTest());
addTest(new MoveTest());
addTest(new DeleteTreeTest());
}
}
class OverrideVersioningTestGroup extends AbstractSessionTestGroup
{
@Override
public void init(Map<String, String> parameters) throws Exception
{
super.init(parameters);
setName("Versioning Test Group");
setDescription("Versioning tests.");
addTest(new VersioningSmokeTest());
addTest(new VersionDeleteTest());
// Our versioning and checkout/checkin services don't play nice with the CMIS specification.
// Specifically, creating a document with VersioningState CHECKEDOUT creates a node and a working copy
// node, whereas the CMIS specification requires a document created in this state just have a working
// copy until it is checked in.
// Disable until we figure out a way to resolve it.
// addTest(new VersioningStateCreateTest());
addTest(new CheckedOutTest());
}
}
/**
* Override to OpenCMIS QueryTestGroup to allow me to disable failing tests.
*
* @author steveglover
*
*/
class OverrideQueryTestGroup extends AbstractSessionTestGroup
{
@Override
public void init(Map<String, String> parameters) throws Exception {
super.init(parameters);
setName("Query Test Group");
setDescription("Query and content changes tests.");
addTest(new QuerySmokeTest());
// QueryRootFolderTest is currently failing - disable for now
//addTest(new QueryRootFolderTest());
addTest(new QueryLikeTest());
addTest(new ContentChangesSmokeTest());
}
}
@Override
protected TestFixture getTestFixture() throws Exception
{
return TCKEnterpriseTestFixture.getInstance();
}
}