mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-12898: Fixed up merge
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@34056 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -43,7 +43,7 @@ public class WarHelperImplTest extends WarHelperImpl
|
|||||||
@Test
|
@Test
|
||||||
public void testCheckCompatibleVersion()
|
public void testCheckCompatibleVersion()
|
||||||
{
|
{
|
||||||
File theWar = getFile(".war", "module/test.war"); //Version 4.0.1
|
File theWar = getFile(".war", "module/test.war"); //Version 4.1.0
|
||||||
|
|
||||||
ModuleDetails installingModuleDetails = new ModuleDetailsImpl("test_it", new VersionNumber("9999"), "Test Mod", "Testing module");
|
ModuleDetails installingModuleDetails = new ModuleDetailsImpl("test_it", new VersionNumber("9999"), "Test Mod", "Testing module");
|
||||||
installingModuleDetails.setRepoVersionMin(new VersionNumber("10.1"));
|
installingModuleDetails.setRepoVersionMin(new VersionNumber("10.1"));
|
||||||
@@ -74,9 +74,25 @@ public class WarHelperImplTest extends WarHelperImpl
|
|||||||
installingModuleDetails.setRepoVersionMax(new VersionNumber("99"));
|
installingModuleDetails.setRepoVersionMax(new VersionNumber("99"));
|
||||||
this.checkCompatibleVersion(theWar, installingModuleDetails); //does not throw exception
|
this.checkCompatibleVersion(theWar, installingModuleDetails); //does not throw exception
|
||||||
|
|
||||||
installingModuleDetails.setRepoVersionMin(new VersionNumber("4.0.1")); //current war version
|
installingModuleDetails.setRepoVersionMin(new VersionNumber("4.1.0")); //current war version
|
||||||
installingModuleDetails.setRepoVersionMax(new VersionNumber("4.0.1")); //current war version
|
installingModuleDetails.setRepoVersionMax(new VersionNumber("4.1.0")); //current war version
|
||||||
this.checkCompatibleVersion(theWar, installingModuleDetails); //does not throw exception
|
this.checkCompatibleVersion(theWar, installingModuleDetails); //does not throw exception
|
||||||
|
|
||||||
|
installingModuleDetails.setRepoVersionMin(new VersionNumber("3.4.0")); //current war version
|
||||||
|
installingModuleDetails.setRepoVersionMax(new VersionNumber("4.1.0")); //current war version
|
||||||
|
this.checkCompatibleVersion(theWar, installingModuleDetails); //does not throw exception
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
installingModuleDetails.setRepoVersionMin(new VersionNumber("3.4.0")); //current war version
|
||||||
|
installingModuleDetails.setRepoVersionMax(new VersionNumber("4.0.999")); //current war version
|
||||||
|
this.checkCompatibleVersion(theWar, installingModuleDetails); //does not throw exception
|
||||||
|
fail("Should not pass as current version is 4.1.0 and the max value is 4.0.999"); //should never get here
|
||||||
|
}
|
||||||
|
catch (ModuleManagementToolException exception)
|
||||||
|
{
|
||||||
|
assertTrue(exception.getMessage().endsWith("cannot be installed on a repo version greater than 4.0.999"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user