Update to web repository web service to add association filter. Module management tool can now install AMP from a given directory.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5018 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2007-02-02 14:47:14 +00:00
parent 3e478f1950
commit 63e3b7453d
2 changed files with 111 additions and 13 deletions

View File

@@ -181,6 +181,31 @@ public class ModuleManagementToolTest extends TestCase
this.manager.installModule(ampLocation, warLocation, false, true, false);
}
public void testInstallFromDir()
throws Exception
{
manager.setVerbose(true);
String warLocation = getFileLocation(".war", "module/test.war");
String ampLocation = getFileLocation(".amp", "module/test.amp");
String ampV2Location = getFileLocation(".amp", "module/test_v2.amp");
int index = ampV2Location.lastIndexOf(File.separator);
System.out.println(index);
String directoryLocation = ampV2Location.substring(0, index);
System.out.println(warLocation);
System.out.println(directoryLocation);
try
{
this.manager.installModules(directoryLocation, warLocation);
}
catch (ModuleManagementToolException exception)
{
// ignore since we are expecting this
}
}
public void testList()
throws Exception
{
@@ -199,6 +224,7 @@ public class ModuleManagementToolTest extends TestCase
{
File file = File.createTempFile("moduleManagementToolTest-", extension);
InputStream is = this.getClass().getClassLoader().getResourceAsStream(location);
assertNotNull(is);
OutputStream os = new FileOutputStream(file);
FileCopyUtils.copy(is, os);
return file.getPath();