Package up the Web Script tests into a suite

All except one test have gone into the suite, that one is listed explicitly
 in build.xml as it needs to be run in its own JVM as it has its own
 custom context that won't shut down properly.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19232 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2010-03-11 16:37:13 +00:00
parent 66bbd4339a
commit 0f9971aca0
2 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.web.scripts;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.alfresco.repo.web.scripts.activities.SiteActivitySystemTest;
import org.alfresco.repo.web.scripts.activities.feed.control.FeedControlTest;
import org.alfresco.repo.web.scripts.blog.BlogServiceTest;
import org.alfresco.repo.web.scripts.dictionary.DictionaryRestApiTest;
import org.alfresco.repo.web.scripts.discussion.DiscussionServiceTest;
import org.alfresco.repo.web.scripts.forms.FormRestApiGet_Test;
import org.alfresco.repo.web.scripts.forms.FormRestApiJsonPost_Test;
import org.alfresco.repo.web.scripts.groups.GroupsTest;
import org.alfresco.repo.web.scripts.invitation.InvitationTest;
import org.alfresco.repo.web.scripts.invite.InviteServiceTest;
import org.alfresco.repo.web.scripts.person.PersonServiceTest;
import org.alfresco.repo.web.scripts.preference.PreferenceServiceTest;
import org.alfresco.repo.web.scripts.rule.RuleServiceTest;
import org.alfresco.repo.web.scripts.search.PersonSearchTest;
import org.alfresco.repo.web.scripts.site.SiteServiceTest;
import org.alfresco.repo.web.scripts.tagging.TaggingServiceTest;
import org.alfresco.repo.web.scripts.thumbnail.ThumbnailServiceTest;
import org.alfresco.repo.web.scripts.transfer.TransferWebScriptTest;
import org.alfresco.repo.web.scripts.wcm.WebProjectTest;
import org.alfresco.repo.web.scripts.wcm.membership.WebProjectMembershipTest;
import org.alfresco.repo.web.scripts.wcm.sandbox.AssetTest;
import org.alfresco.repo.web.scripts.wcm.sandbox.SandboxTest;
import org.alfresco.util.ApplicationContextHelper;
/**
* Web Scripts test suite
*/
public class WebScriptTestSuite extends TestSuite
{
public static Test suite()
{
TestSuite suite = new TestSuite();
// Ensure that a suitable context is available
TestWebScriptRepoServer.getTestServer();
// Add the tests
suite.addTestSuite( ThumbnailServiceTest.class );
suite.addTestSuite( TransferWebScriptTest.class );
suite.addTestSuite( DiscussionServiceTest.class );
suite.addTestSuite( LoginTest.class );
suite.addTestSuite( FormRestApiJsonPost_Test.class );
suite.addTestSuite( FormRestApiGet_Test.class );
suite.addTestSuite( TaggingServiceTest.class );
suite.addTestSuite( PersonServiceTest.class );
suite.addTestSuite( SiteServiceTest.class );
suite.addTestSuite( RepositoryContainerTest.class );
suite.addTestSuite( FeedControlTest.class );
suite.addTestSuite( InvitationTest.class );
suite.addTestSuite( PreferenceServiceTest.class );
suite.addTestSuite( RuleServiceTest.class );
suite.addTestSuite( GroupsTest.class );
suite.addTestSuite( InviteServiceTest.class );
suite.addTestSuite( WebProjectMembershipTest.class );
suite.addTestSuite( WebProjectTest.class );
suite.addTestSuite( SandboxTest.class );
suite.addTestSuite( BlogServiceTest.class );
suite.addTestSuite( PersonSearchTest.class );
suite.addTestSuite( DictionaryRestApiTest.class );
suite.addTestSuite( ThumbnailServiceTest.class );
// This uses a slightly different context
// As such, we can't run it in the same suite as the others,
// due to finalisers closing caches when we're not looking
//suite.addTestSuite( AssetTest.class );
return suite;
}
}

View File

@@ -97,6 +97,7 @@ public class ThumbnailServiceTest extends BaseWebScriptTest
{ {
super.tearDown(); super.tearDown();
AuthenticationUtil.clearCurrentSecurityContext();
} }
public void testCreateThumbnail() throws Exception public void testCreateThumbnail() throws Exception