mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
FIXED : ALF-12531: MMT needs to properly support upgrading of AMP files
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@33695 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -210,6 +210,28 @@ public class ModuleManagementToolTest extends TestCase
|
||||
// TODO need to prove that the war file has not been updated in any way
|
||||
}
|
||||
|
||||
|
||||
public void testUninstall()
|
||||
throws Exception
|
||||
{
|
||||
manager.setVerbose(true);
|
||||
|
||||
String warLocation = getFileLocation(".war", "module/test.war");
|
||||
String ampLocation = getFileLocation(".amp", "module/test_v1.amp");
|
||||
|
||||
// Initial install of module
|
||||
this.manager.installModule(ampLocation, warLocation, false, false, false);
|
||||
this.manager.listModules(warLocation);
|
||||
this.manager.uninstallModule("test", warLocation, false, false);
|
||||
|
||||
List<String> files = new ArrayList<String>(10);
|
||||
files.add("/WEB-INF/classes/alfresco/module/test/module.properties");
|
||||
files.add("/WEB-INF/classes/alfresco/module/test/modifications.install");
|
||||
files.add("/WEB-INF/lib/test.jar");
|
||||
files.add("/WEB-INF/classes/alfresco/module/test/module-context.xml");
|
||||
checkForFileNonExistance(warLocation, files);
|
||||
}
|
||||
|
||||
public void testForcedInstall()
|
||||
throws Exception
|
||||
{
|
||||
@@ -247,6 +269,7 @@ public class ModuleManagementToolTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void testList()
|
||||
throws Exception
|
||||
{
|
||||
@@ -271,6 +294,21 @@ public class ModuleManagementToolTest extends TestCase
|
||||
return file.getPath();
|
||||
}
|
||||
|
||||
// public void testNoWar() throws Exception
|
||||
// {
|
||||
// File noWar = new File("noWar");
|
||||
// File amp = getFile(".amp", "module/test_v1.amp");
|
||||
// try
|
||||
// {
|
||||
// this.manager.installModule(amp, noWar,false,false);
|
||||
// }
|
||||
// catch (ModuleManagementToolException exception)
|
||||
// {
|
||||
// assertTrue(exception.getMessage().endsWith("does not exist."));
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
private void checkForFileExistance(String warLocation, List<String> files)
|
||||
{
|
||||
for (String file : files)
|
||||
|
Reference in New Issue
Block a user