mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Removed superseded changes brought in by the merge.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@33777 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,10 +30,7 @@ import java.util.Map;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.alfresco.repo.module.ModuleDetailsImpl;
|
||||
import org.alfresco.service.cmr.module.ModuleDetails;
|
||||
import org.alfresco.util.TempFileProvider;
|
||||
import org.alfresco.util.VersionNumber;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
import de.schlichtherle.io.DefaultRaesZipDetector;
|
||||
@@ -267,48 +264,10 @@ public class ModuleManagementToolTest extends TestCase
|
||||
}
|
||||
catch (ModuleManagementToolException exception)
|
||||
{
|
||||
exception.printStackTrace();
|
||||
System.out.println("Expected failure: " + exception.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void testCheckTargetWarVersion() throws Exception
|
||||
{
|
||||
manager.setVerbose(true);
|
||||
String warLocation = getFileLocation(".war", "module/test.war"); //Version 4.0.1
|
||||
|
||||
ModuleDetails installingModuleDetails = new ModuleDetailsImpl("test_it", new VersionNumber("9999"), "Test Mod", "Testing module");
|
||||
installingModuleDetails.setRepoVersionMin(new VersionNumber("10.1"));
|
||||
try
|
||||
{
|
||||
this.manager.checkTargetWarVersion(warLocation, installingModuleDetails);
|
||||
fail(); //should never get here
|
||||
}
|
||||
catch (ModuleManagementToolException exception)
|
||||
{
|
||||
assertTrue(exception.getMessage().endsWith("must be installed on a repo version greater than 10.1"));
|
||||
}
|
||||
|
||||
installingModuleDetails.setRepoVersionMin(new VersionNumber("1.1"));
|
||||
this.manager.checkTargetWarVersion(warLocation, installingModuleDetails); //does not throw exception
|
||||
|
||||
installingModuleDetails.setRepoVersionMax(new VersionNumber("3.0"));
|
||||
try
|
||||
{
|
||||
this.manager.checkTargetWarVersion(warLocation, installingModuleDetails);
|
||||
fail(); //should never get here
|
||||
}
|
||||
catch (ModuleManagementToolException exception)
|
||||
{
|
||||
assertTrue(exception.getMessage().endsWith("cannot be installed on a repo version greater than 3.0"));
|
||||
}
|
||||
|
||||
installingModuleDetails.setRepoVersionMax(new VersionNumber("99"));
|
||||
this.manager.checkTargetWarVersion(warLocation, installingModuleDetails); //does not throw exception
|
||||
|
||||
installingModuleDetails.setRepoVersionMin(new VersionNumber("4.0.1")); //current war version
|
||||
installingModuleDetails.setRepoVersionMax(new VersionNumber("4.0.1")); //current war version
|
||||
this.manager.checkTargetWarVersion(warLocation, installingModuleDetails); //does not throw exception
|
||||
}
|
||||
|
||||
|
||||
public void testList()
|
||||
|
Reference in New Issue
Block a user